From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13880 invoked by alias); 25 Apr 2013 18:38:40 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17780 Received: (qmail 20525 invoked from network); 25 Apr 2013 18:38:29 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: neutral (ns1.primenet.com.au: 209.85.212.173 is neither permitted nor denied by SPF record at ntlworld.com) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-proxyuser-ip:date:from:to:subject:message-id :in-reply-to:references:x-mailer:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=mx2M6DbDfam1rOTx0JkGMRIE1OvoUATzEe0kXt1QXKg=; b=Afjy7sO4CYGsKMJlKpowNgpBloTJKzXb/JkMWB1S/su6uuLgN7xC0CZphTZ/73jASF P3D2ss8IjkMTuMm7qWkh5TRoioLtLPHr98wHkaEo7ETjZrGp4Q9OZxj/nPICyJyMDa6B pxBP3reEVEaYkseD2eAXQ1cLo7fs0iqqdArm8Q9GUNcMlJ7WhbkE3fHbMSpXCjKnAcb8 tzbcaj9CtzDizE5b42T1Kz7Ols+3fQLNGXyPfmL/bw8oD8zinyeAGNAQ/72fWkGh8Am7 wj2snpcwT3Yn/+PKNAGZdxfoPkLePRYUQsvTsvTZKVqStQvVSucZf+1tBlLzgZVz1EEZ FLnQ== X-Received: by 10.194.119.202 with SMTP id kw10mr4583493wjb.26.1366915100935; Thu, 25 Apr 2013 11:38:20 -0700 (PDT) X-ProxyUser-IP: 86.6.30.159 Date: Thu, 25 Apr 2013 19:38:17 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: precmd: write error: interrupted Message-ID: <20130425193817.2f82b60c@pws-pc.ntlworld.com> In-Reply-To: <130425111646.ZM17258@torch.brasslantern.com> References: <130425111646.ZM17258@torch.brasslantern.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnPchpTVbxkP7UgyBNa4pISm+EKlJ/BXppsUlgcTZ7AsPy+BYUEtamm8ydUaC9YpNMRgM3D On Thu, 25 Apr 2013 11:16:46 -0700 Bart Schaefer wrote: > } 1) SIGWINCH should either be masked or allow write to restart. > > This requires some thought about the appropriate layer to handle this. > bin_print does already do some signal queuing when writing to internal > data structures (print -z, print -s), but that's deliberately isolated > to bin_print, whereas all sorts of other things might write to the > terminal -- including other error messages! -- so patching bin_print is > not covering all the bases. Certainly true, but I'm hesitant to do nothing except declare it's difficult... Explicit user output via print and error messages via zsh's own error and warning functions are two cases that cover quite a lot. If there's already signal queuing in print, is it up to snuff? Is there ever a good reason for allowing a single print to be interrupted at the point of output --- surely it's always going to do unhelpful things? I don't think we'd want to queue interrupts round all builtins, but could we mark those that produce output but otherwise return immediately with a flag in the builtin table and do some queueing in the builtin handler? > On the other hand we probably don't want to build a wrapper around the > entire stdio library just to differentiate terminal writes. It certainly doesn't sound feasible to do much at the stdio level. If we were just talking about write() it might feasible to use a simple wrapper in key places, but it sounds like it can't be reduced to that. pws