SIGKILL to pty master
- From: "Bill Pursell" <bill.pursell@xxxxxxxxx>
- Date: 23 May 2006 11:17:45 -0700
Apparently, my understanding of the process
model is completely wrong. :(
A process forks. The parent pauses, the
child forks and pauses, the grandchild pauses.
Suppose this was executed from an interactive
shell on a pty (eg running in konsole or screen).
If I send a SIGKILL to the shell, all of the
processes are terminated. However, if the shell
was running on a virtual terminal, the processes
continue to run after the death of the shell.
I believe that what is happening is that the
shell's death causes the pty to be destroyed,
which causes a signal to be sent to the
foreground process group that is attached
to the pty. Is that correct? The behavior
that interests me is the termination of
the descendants in the face of the SIGKILL.
I'd like to emulate this behavior: that is,
I'd like a process to be able to have many
children, and guarantee that all the children are
terminated if the process receives a SIGKILL.
It looks like I could emulate that by opening
a pty and ensuring that all of the descendants
remain in the foreground process group. That,
however, seems like a massive kludge. Is there
an easier way? Any tips appreciated.
--
Bill Pursell
.
- Follow-Ups:
- Re: SIGKILL to pty master
- From: Spoon
- Re: SIGKILL to pty master
- Prev by Date: Re: Disk performance testing
- Next by Date: Re: alarm() - what am I doing wrong??? The answer
- Previous by thread: Disk performance testing
- Next by thread: Re: SIGKILL to pty master
- Index(es):
Relevant Pages
|
|