Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh-3.1.9-dev-6 crashes occassionally
- X-seq: zsh-workers 13104
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: zsh-3.1.9-dev-6 crashes occassionally
- Date: Tue, 31 Oct 2000 15:25:52 +0000
- In-reply-to: <0G3A00G16RTYPP@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- In-reply-to: <200010311401.PAA00843@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <0G3A00G16RTYPP@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <200010311401.PAA00843@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Oct 31, 1:51pm, Peter Stephenson wrote:
} Subject: Re: zsh-3.1.9-dev-6 crashes occassionally
}
} Sven wrote:
} > + ALLOWTRAPS {
} > + while ((r = read(SHTTY, &cc, 1)) != 1) {
}
} I suppose you've thought this through more than I have, but wouldn't it be
} safer just to run traps every time the read returns? I'm assuming a signal
} arriving will interrupt the read in any case, so as far as I can see it's
} pretty much equivalent in practise.
On Oct 31, 3:01pm, Sven Wischnowsky wrote:
}
} Unless someone knows of a system where signals don't interrupt things
} like read.
Ever heard of BSD restartable system calls?
Signals don't always interrupt things like read. On systems that have
the sigaction() interface, you can choose to turn restartable-ness on and
off, but on an older BSD system the only way out of a system call from a
signal handler is with setjmp/longjmp. That's what I was talking about
before in my last message. (I haven't used a modern openbsd/freebsd system,
so it may not be an issue there any longer.)
--
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author