Subject: CVS commit: [netbsd-2] src/usr.sbin/rpc.statd
To: None <source-changes@NetBSD.org>
From: Jeff Rizzo <email@example.com>
Date: 11/06/2005 00:28:53
Module Name: src
Committed By: riz
Date: Sun Nov 6 00:28:53 UTC 2005
src/usr.sbin/rpc.statd [netbsd-2]: stat_proc.c
Pull up following revision(s) (requested by bouyer in ticket #5967):
usr.sbin/rpc.statd/stat_proc.c: revision 1.7
When forking, we keep a reference to the status db file, and if the
memory copy of the file is dirty, is will be synced when the child exists.
But the parent may have done changes to the database in the meantime, resulting
in a db corruption.
Fix this by calling sync_file() just before the fork. The child will still have
a reference to the db, but won't try to write it on exit.
To generate a diff of this commit:
cvs rdiff -r1.6 -r220.127.116.11 src/usr.sbin/rpc.statd/stat_proc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.