Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Which signal >(process) receives after main shell exits?
- X-seq: zsh-users 23388
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Which signal >(process) receives after main shell exits?
- Date: Fri, 11 May 2018 07:18:29 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Sod4Jk3Ko7Vx7GfJ1mnLVfpDMNPDMAPKEBINC7qGDoQ=; b=GtEke44SRc0srMXh1d3MmZ0QBsKbbgTcXNwYMQCI7PwIqKn8kZDDQf9+MV8ybO0B0m r6raEeTDdnr1+NY+g+QlX07EvRe8HZBBvCE7ETRe3xMw4yvwn8KDFVhRfSqP4d4AoO7X vSPxJfrGEwTtkG/9lsVjPZE430JTiFmrMqFemroyAnR+iPRiM4/cLdZKu/qFCTzeCwk+ yulNFcFjtoQhIebsmhUu8qMloSoohownwCSOEYC4H5Ie5Eo/I2TdIgCsXu6M+ewh0e11 EZZ3Kz6dshKIcmz17Wc8wM0SWL8clw24yApOd2I0nJcru4TOaVHVjnFFmJHFCBozgbzA Xqjw==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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