From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23358 invoked by alias); 26 Apr 2013 18:22:58 -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: 17788 Received: (qmail 11551 invoked from network); 26 Apr 2013 18:22:56 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at users.sourceforge.net does not designate permitted sender hosts) Message-ID: <517AC077.9080703@users.sourceforge.net> Date: Fri, 26 Apr 2013 19:59:19 +0200 From: Yuri D'Elia User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 Newsgroups: gmane.comp.shells.zsh.devel To: Bart Schaefer CC: zsh-users@zsh.org Subject: Re: precmd: write error: interrupted References: <130425111646.ZM17258@torch.brasslantern.com> <130426080805.ZM18619__18102.73175729$1366989065$gmane$org@torch.brasslantern.com> In-Reply-To: <130426080805.ZM18619__18102.73175729$1366989065$gmane$org@torch.brasslantern.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 04/26/2013 05:08 PM, Bart Schaefer wrote: > } What other syscalls would be interrupted by SIGWINCH that shouldn't be > } restarted? Right now I cannot think of anything that SIGWINCH should > } interrupt. > > I've been thinking about this, and the problem with using SA_RESTART is > twofold: > > (1) [Minor] Some platforms don't have restartable syscalls, so this won't > work everywhere. But perhaps the intersection of non-restarable syscalls > and support for SIGWINCH is empty. (I'm somehow curious of which systems don't support SIGWINCH, must be particularly old). > (2) [Potentially major] A user-defined trap can be installed for the > SIGWINCH signal. That means arbitrary shell code might execute during > handling of the signal, so all sorts of things might happen mid-write, > not just the default ioctls. I see, and now I also see your reasoning about queuing SIGWINCH everywhere except when waiting in zleread. At any rate, that's the only point where updating the terminal for the upcoming output makes sense. Updating the column count (for example) while in the middle of a widget expansion for instance won't likely help (or maybe even break some invariant).