This is the mail archive of the
mailing list for the Cygwin project.
Re: Bash process remains after I close rxvt in certain ways
Charles Wilson <cygwin <at> cwilson.fastmail.fm> writes:
> Or what *should* be happening.
> So, I think that in src/command.c, right before exit() is called, rxvt
> ought to kill its children -- except I thought exit() should do that
"Termination of a process does not directly terminate its children. The sending
of a SIGHUP signal as described below indirectly terminates children in some
"If the process is a controlling process, the SIGHUP signal shall be sent to
each process in the foreground process group of the controlling terminal
belonging to the calling process.
"If the process is a controlling process, the controlling terminal associated
with the session shall be disassociated from the session, allowing it to be
acquired by a new controlling process.
"If the exit of the process causes a process group to become orphaned, and if
any member of the newly-orphaned process group is stopped, then a SIGHUP signal
followed by a SIGCONT signal shall be sent to each process in the newly-
orphaned process group."
Sounds like you are right - rxvt should be a controlling process, so calling
exit() should automatically cause cygwin to send SIGHUP to the process group,
and rxvt shouldn't have to do any manual killing.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html