Subject: CVS commit: src/usr.sbin/rpc.statd
To: None <source-changes@NetBSD.org>
From: Manuel Bouyer <bouyer@netbsd.org>
List: source-changes
Date: 11/03/2005 19:36:42
Module Name: src
Committed By: bouyer
Date: Thu Nov 3 19:36:42 UTC 2005
Modified Files:
src/usr.sbin/rpc.statd: stat_proc.c
Log Message:
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 -r1.7 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.