* dcrt0.cc (child_info_spawn::handle_spawn): Call fixup_lockf_after_exec

with additional argument to specify if the process has been execed
	or spawned.
	* flock.cc (fixup_lockf_after_exec): Take bool parameter to handle
	exec and spawn differently.  In case of spawn, just give up POSIX
	locks in favor of the still running parent.  Add comments to explain.
This commit is contained in:
Corinna Vinschen
2014-02-10 10:45:51 +00:00
parent 2f850d402e
commit 127cfd4f5a
3 changed files with 33 additions and 8 deletions

View File

@@ -655,7 +655,7 @@ child_info_spawn::get_parent_handle ()
void
child_info_spawn::handle_spawn ()
{
extern void fixup_lockf_after_exec ();
extern void fixup_lockf_after_exec (bool);
HANDLE h;
if (!dynamically_loaded || get_parent_handle ())
{
@@ -706,7 +706,7 @@ child_info_spawn::handle_spawn ()
}
signal_fixup_after_exec ();
fixup_lockf_after_exec ();
fixup_lockf_after_exec (type == _CH_EXEC);
}
/* Retrieve and store system directory for later use. Note that the