summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/spawn.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-07-05 02:05:07 +0000
committerChristopher Faylor <me@cgf.cx>2005-07-05 02:05:07 +0000
commit26edeb6a7f6c541a25ee7fa4c201b24fea01cc50 (patch)
tree037b544f95c625b879b2bf518e69313c42a5245f /winsup/cygwin/spawn.cc
parenta64b8b2dec5ba82dd3933a959e3e3f5f09116963 (diff)
downloadcygnal-26edeb6a7f6c541a25ee7fa4c201b24fea01cc50.tar.gz
cygnal-26edeb6a7f6c541a25ee7fa4c201b24fea01cc50.tar.bz2
cygnal-26edeb6a7f6c541a25ee7fa4c201b24fea01cc50.zip
* cygtls.h (_cygtls): Perform minor reformatting.
* winsup.h (close_all_files): Reflect argument change. * dtable.cc (close_all_files): Ditto. * dtable.h: Ditto. * fhandler.h: Ditto. * spawn.cc (spawn_guts): Move close_all_files back to its original location in first P_OVERLAY test but use argument denoting that handles are only supposed to be closed, not released (more work to be done here). * syscalls.cc (close_all_files): Take an argument denoting whether to release closed files or not. * path.cc (symlink): Change argument names to reflect linux man page. (symlink_worker): Ditto. Also appropriately set ENOENT for empty strings.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 7f4d8fb0f..6aef5feb6 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -800,6 +800,7 @@ spawn_guts (const char * prog_arg, const char *const *argv,
strace.execing = 1;
myself.hProcess = hExeced = pi.hProcess;
strcpy (myself->progname, real_path); // FIXME: race?
+ close_all_files (true);
sigproc_printf ("new process name %s", myself->progname);
/* If wr_proc_pipe doesn't exist then this process was not started by a cygwin
process. So, we need to wait around until the process we've just "execed"
@@ -869,7 +870,6 @@ spawn_guts (const char * prog_arg, const char *const *argv,
switch (mode)
{
case _P_OVERLAY:
- close_all_files ();
if (!synced)
/* let myself.exit handle this */;
else if (myself->wr_proc_pipe)