* 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:
@@ -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
|
||||
|
Reference in New Issue
Block a user