From: "Bart Schaefer" <schaefer@brasslantern.com>
To: bperkins@netspace.org, zsh-users@sunsite.dk
Subject: Re: signals in loops
Date: Tue, 22 Oct 2002 15:50:51 +0000 [thread overview]
Message-ID: <1021022155051.ZM13080@candle.brasslantern.com> (raw)
In-Reply-To: <200210220249.g9M2nVO29377@throb.netspace.org>
On Oct 21, 10:49pm, bperkins@netspace.org wrote:
} Subject: signals in loops
}
} I've been using zsh for a while, and I'd swear you used to be able to
} do this:
}
} for foo in 1 2 3 4 5 6 ; do xmessage $foo; done
}
} and you could give control-c to kill the xmessage and the next one
} would pop up.
Yes, you did used to be able to do that. It was a bug. :-) To see why
it was a bug, consider trying to interrupt this:
while : ; do something; done
} Which brings up a mostly acidemic question, what is the default
} "trap?"
There isn't any way to write the default signal handling behavior in the
shell language. Effectively you're correct that it breaks from all loops
on the INT or QUIT signals.
On the TSTP signal, recent versions of zsh implicitly force the entire
loop into a subshell in order to be able to stop it. Forking that sub-
shell is delayed until the signal is actually received.
--
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
prev parent reply other threads:[~2002-10-22 15:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-22 2:49 bperkins
2002-10-22 15:50 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1021022155051.ZM13080@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=bperkins@netspace.org \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).