Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
exec'ing $0 in traps
- X-seq: zsh-users 22472
- From: Andre Albsmeier <Andre.Albsmeier@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: exec'ing $0 in traps
- Date: Fri, 17 Feb 2017 09:16:04 +0100
- Cc: Andre.Albsmeier@xxxxxxxxxxx
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
When sending SIGHUP to this script:
#!/bin/zsh
echo started
trap 'echo trapped; exec "$0"' 1
echo $$ > /tmp/blafasel
while read line; do
echo line $line
done
restarting works exactly one time and then no more. With
FreeBSD's native /bin/sh or even the lousy /bin/bash it
works as expected.
What am I doing wrong?
-Andre
Messages sorted by:
Reverse Date,
Date,
Thread,
Author