From 38d732a152ff27601b385c00e6574111461b65c4 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 20 Oct 2011 14:02:54 +0000 Subject: Throughout change TTY_* to PTY_*, tty_* to pty_*, and ttym_* to ptmx_*. * devices.cc: Regenerate. * dtable.cc: (fh_alloc): Preserve /dev/tty name when that's what we opened. (build_fh_pc): Preserve any existing name. * fhandler.cc (fhandler_base::open_with_arch): Ditto. * fhandler_tty.cc (fhandler_pty_master::fhandler_pty_master): Force the name to /dev/ptmx while preserving other pty master device information. * path.h (cfree_maybe): New macro. (path_conv::operator =): Free any allocated strings in target. (path_conv::free_strings): Delete unused function. * sigproc.cc (proc_terminate): Remove previous accommodation for execed processes since it didn't have the desired effect. Change comment to a FIXME. * spawn.cc (chExeced): Mark NO_COPY. (exe_suffixes): Ditto. --- winsup/cygwin/sigproc.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'winsup/cygwin/sigproc.cc') diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index f77472ba5..95d87e55e 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -374,14 +374,13 @@ proc_terminate () int i; for (i = 0; i < nprocs; i++) { - extern child_info_spawn *chExeced; - /* Don't reset the ppid to 1 if this pid is still going to be - associated with a process. - FIXME: The problem with this simplistic approach is that the - ppid for any surviving children will never be set to 1 in - this scenario. A potential fix would be to move procs into - cygheap but that would complicate startup. What else is new? */ - if (!chExeced) + /* FIXME: Resetting the ppid to 1 when this process execs is decidedly + non-UNIXy. We should, at the very least, keep a list of pids + for the exec process to reset when *it* exits. However, avoiding + setting ppid when we are exec'ing causes the ppid to *never* be + set to 1 so we don't do that either. + if (!hExeced) + */ procs[i]->ppid = 1; if (procs[i].wait_thread) { -- cgit v1.2.3