diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-02-10 14:45:51 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-02-10 14:45:51 +0400 |
commit | 127cfd4f5abfa7913a8f5704f9ba8978f9b4baae (patch) | |
tree | edd29f22490d7289b46ac50b5e1bf121fa32c715 /winsup/cygwin/dcrt0.cc | |
parent | 2f850d402ed6419061855c40a925fe0cb8835459 (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index d348d9bd5..07cbd4d26 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -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 |