From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22511 invoked from network); 31 Oct 2000 15:42:30 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 Oct 2000 15:42:30 -0000 Received: (qmail 9562 invoked by alias); 31 Oct 2000 15:42:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13105 Received: (qmail 9555 invoked from network); 31 Oct 2000 15:42:24 -0000 Date: Tue, 31 Oct 2000 16:42:22 +0100 (MET) Message-Id: <200010311542.QAA01070@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Tue, 31 Oct 2000 15:25:52 +0000 Subject: Re: zsh-3.1.9-dev-6 crashes occassionally Bart Schaefer wrote: > 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? Yes, of course. But we set S[AV]_INTERRUPT on our signal handlers, so... > 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. ...are there still such systems? Hm. Anyway, the way the patch handles this should be ok, because (if I've found all the places where a possibly blocking system call is made) traps are called during such system calls. > That's what I was talking about > before in my last message. Aha, I admit I was wondering... No, I definitely think we shouldn't even start to think about using that as long as the way the patch handles it works. If it works. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de