Noticed this for ksh93t releases 05-01-2009 and 05-05-2009.

If you trap SIGCHLD, all other traps are ignored, as shown in this test case:

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

Removing the trap on SIGCHLD causes all other traps to work 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

_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to