Chet Ramey wrote: > 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.
I am looking at the apparent contradiction between this and the previous answer. It might be that the shell begun to run test2 undoes the signal ignoring performed when it is initally forked. It seems like somewhere along the line the SIGINT handling is being changed. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live Strong. Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/ _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash