zsh-workers
 help / color / mirror / code / Atom feed
* Local traps again: This is useful, but is it correct?
@ 2000-06-10 20:16 Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2000-06-10 20:16 UTC (permalink / raw)
  To: zsh-workers

One can bypass the "locatraps" option by creating a TRAPxxx function, e.g.
the function remains defined after endtrapscope() but a trap created with
`trap ... xxx' is removed.

This is one of two reasons that Functions/Prompts/promp_bart_setup uses an
assignment to the functions assoc to install a SIGWINCH handler, so I'm not
sure I advocate changing it; but it at least ought to be mentioned in the
doc under LOCAL_TRAPS.

For completeness, I should point out that the TRAPxxx defintion only wins
if there IS NOT already a trap for signal xxx at some higher scope.  So it
does behave somewhat inconsistently.

I was about to doublecheck on what happens with `trap ... xxx' in that last
situation, but zsh just crashed again, so I'm going to quit fooling with
signals until Sven comes back online.

-- 
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   


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-06-10 20:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-10 20:16 Local traps again: This is useful, but is it correct? Bart Schaefer

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).