diff options
author | Christopher Faylor <me@cgf.cx> | 2000-10-25 07:54:50 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-10-25 07:54:50 +0400 |
commit | f8f9b12e6c3641678f931147b3f6f2c69c72201d (patch) | |
tree | 3243412fe0a1f729de76aff3c58103ab64086205 /winsup/cygwin/dcrt0.cc | |
parent | 8c8d0db462de553d960b45968c3c77bb73b6b170 (diff) |
* dcrt0.cc (do_exit): Don't bother looking for pgrp children to send SIGHUP if
process has never created any children.
* fork.cc (fork): Set flag indicating that there is another process with our
process group.
* spawn.cc (spawn_guts): Ditto.
* pinfo.h (set_has_pgid_children): New methods for setting when process has
children in its process group.
* syscalls.cc (setpgid): Clear has_gid_children if pgid changes.
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 c23f1dbc0..8e6098b0e 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -1024,7 +1024,7 @@ do_exit (int status) set_console_title (old_title); /* Kill orphaned children on group leader exit */ - if (myself->pid == myself->pgid) + if (myself->has_pgid_children && myself->pid == myself->pgid) { system_printf ("%d == pgrp %d, send SIG{HUP,CONT} to stopped children", myself->pid, myself->pgid); @@ -1041,7 +1041,7 @@ do_exit (int status) myself->pid, myself->sid); if (tp->getsid () == myself->sid) - kill (-tp->getpgid (), SIGHUP); + kill_pgrp (tp->getpgid (), SIGHUP); } tty_terminate (); |