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

Which signal >(process) receives after main shell exits?



Hello,

% fun() {
   setopt localtraps
   trap "echo waiting >> /tmp/reply; sleep 2; echo bye >> /tmp/reply; exit
1;" EXIT
   echo "My PID: $sysparams[pid]"
   repeat 1000; do
      read -r -t 1 line
   done
}

% exec {MYFD}> >(fun)
% exit

Above works – fun() will receive the trap, messages will appear in
/tmp/reply.

My question: can be "EXIT" replaced by some actual signal? I've tried PIPE,
HUP, INT, TERM and they didn't work.

-- 
Best regards,
Sebastian Gniazdowski


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