zsh-users
 help / color / mirror / code / Atom feed
* exec'ing $0 in traps
@ 2017-02-17  8:16 Andre Albsmeier
  2017-02-17 20:02 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Andre Albsmeier @ 2017-02-17  8:16 UTC (permalink / raw)
  To: zsh-users; +Cc: Andre.Albsmeier

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-18 10:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-17  8:16 exec'ing $0 in traps Andre Albsmeier
2017-02-17 20:02 ` Bart Schaefer
2017-02-18 10:24   ` Andre Albsmeier

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).