Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

On the subject of traps ... and notify ...



I just noticed that if one installs a trap for the child-exited signal,
the nonotify option gets ignored.  That is:

schaefer[505] TRAPCLD() { zle -I && print DING }
schaefer[506] setopt nonotify
schaefer[507] sleep 10 &
[1] 24733
schaefer[508] echo this is a test
DING
schaefer[508] echo this is a test
[1]  + done       sleep 10
schaefer[508] echo this is a test

(type ^U and then)

schaefer[508] unfunction -m TRAP\*
schaefer[509] sleep 10 &
[1] 24735
schaefer[510] echo THE OTHER WAS A TEST
THE OTHER WAS A TEST
[1]  + done       sleep 10
schaefer[511] 

(having sat waiting for at least 30 seconds after typing "A TEST" just to
make sure the sleep had finished before I pressed enter).

On a somewhat related note, it appears that one has to know whether to
use TRAPCLD or TRAPCHLD depending on which signal "kill -l" reports as
the one for your operating system.  I would have thought that zsh would
equate them.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author