From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20845 invoked from network); 31 Oct 2000 13:52:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 Oct 2000 13:52:10 -0000 Received: (qmail 22562 invoked by alias); 31 Oct 2000 13:52:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13102 Received: (qmail 22555 invoked from network); 31 Oct 2000 13:52:05 -0000 Date: Tue, 31 Oct 2000 13:51:35 +0000 From: Peter Stephenson Subject: Re: zsh-3.1.9-dev-6 crashes occassionally In-reply-to: "Your message of Tue, 31 Oct 2000 14:19:18 +0100." <200010311319.OAA00721@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Message-id: <0G3A00G16RTYPP@la-la.cambridgesiliconradio.com> Content-transfer-encoding: 7BIT 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. There's nothing too nasty in the block underneath, but it does call zrefresh() and attachtty() which are probably best treated as black boxes. -- Peter Stephenson Software Engineer Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070