This appears to have been introduced after 2008-11-04. If you set a trap on SIGCHLD, all other previously set traps are ignored from ksh 2009-05-05 up through ksh 2009-10-14.
Setting traps on SIGUSR1 and SIGUSR2 works as expected: ksh93 -c 'trap "print got_USR1" SIGUSR1 ; trap "print got_USR2" SIGUSR2 ; sleep 2 & for (( i = 0; i < 5; i++ )) ; do print $i ; sleep 1 ; kill -USR1 $$ ; kill -USR2 $$ ; done ; wait ; print " done"' Output follows: 0 got_USR1 got_USR2 1 got_USR1 got_USR2 2 got_USR1 got_USR2 3 got_USR1 got_USR2 4 got_USR1 got_USR2 done Adding a trap on SIGCHLD to the mix gives this unexpected output: ksh93 -c 'trap "print got_CHLD" SIGCHLD ; trap "print got_USR1" SIGUSR1 ; trap "print got_USR2" SIGUSR2 ; sleep 2 & for (( i = 0; i < 5; i++ )) ; do print $i ; sleep 1 ; kill -USR1 $$ ; kill -USR2 $$ ; done ; wait ; print " done"' Output follows: 0 1 got_CHLD 2 3 4 done Running the same script above under ksh93 2008-11-04 gives the expected output: 0 got_USR1 got_USR2 1 got_CHLD got_USR1 got_USR2 2 got_USR1 got_USR2 3 got_USR1 got_USR2 4 got_USR1 got_USR2 done Gordon _______________________________________________ ast-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-users
