[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Background processes receive SIGINT even though they shouldn't
From: |
Chet Ramey |
Subject: |
Re: Background processes receive SIGINT even though they shouldn't |
Date: |
Fri, 13 Jan 2006 11:45:11 -0500 |
User-agent: |
Thunderbird 1.5 (Macintosh/20051201) |
Ingemar Nilsson wrote:
> I see, thanks. Then I have another question: Why does test2 below fail
> to trap SIGINT when started by test1? It works when I run test2 directly.
POSIX says:
When a command is in an asynchronous list, the shell shall prevent
SIGQUIT and SIGINT signals from the keyboard from interrupting the command.
I interpret this to mean that test2 must ignore SIGINT when test1
invokes it, since they are in the same process group. Since SIGINT
is ignored when test2 is invoked, the trap on it has no effect.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live Strong.
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/