zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: precmd: write error: interrupted
Date: Sat, 4 May 2013 23:52:20 -0700	[thread overview]
Message-ID: <CAH+w=7YJCF-d0X7_ahK1R3HCch1fsLs1eebACjoc0hF=3BUpAw@mail.gmail.com> (raw)
In-Reply-To: <8738u2b8gy.fsf@ft.bewatermyfriend.org>

[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]

On Sat, May 4, 2013 at 5:01 PM, Frank Terbeck <ft@bewatermyfriend.org>wrote:

> Hi Bart,
>
> I'm afraid these changes break SIGWINCH handling of child processes.
>
>
Not entirely surprising.  I wondered about that but tried it with a couple
of apps before posting and they seemed to be responding to the change in
size.  I didn't actually test whether they were receiving WINCH, though.

The below should help, but someone will have to commit it for me, because
the computer with my sourceforge ssh keys suffered a video chip meltdown
yesterday and I haven't had a chance to repair it or pull the key file from
backup yet.  For the same reason, I'm composing this in gmail, so I hope
the patch has not been mangled.

Something similar may also be needed in the zpty and clone modules.  (Has
anyone ever used the clone module for anything?)

diff --git a/Src/exec.c b/Src/exec.c
index fa14875..c71f3f3 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -303,11 +303,13 @@ zfork(struct timeval *tv)
  zerr("fork failed: %e", errno);
  return -1;
     }
+    if (!pid) {
+ winch_unblock();
 #ifdef HAVE_GETRLIMIT
-    if (!pid)
  /* set resource limits for the child process */
  setlimits(NULL);
 #endif
+    }
     return pid;
 }

  reply	other threads:[~2013-05-05  6:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <klbmnc$ieh$1@ger.gmane.org>
     [not found] ` <130425111646.ZM17258@torch.brasslantern.com>
     [not found]   ` <klc0n1$34u$1@ger.gmane.org>
2013-04-26  0:53     ` Bart Schaefer
     [not found]   ` <20130425193817.2f82b60c@pws-pc.ntlworld.com>
     [not found]     ` <130425151839.ZM17476@torch.brasslantern.com>
2013-04-26  8:42       ` Peter Stephenson
     [not found]   ` <klc2ah$jiv$1@ger.gmane.org>
     [not found]     ` <130426080805.ZM18619__18102.73175729$1366989065$gmane$org@torch.brasslantern.com>
2013-04-26 17:59       ` Yuri D'Elia
     [not found]     ` <130426080805.ZM18619@torch.brasslantern.com>
     [not found]       ` <517C0E09.4040505@users.sourceforge.net>
2013-04-27 22:31         ` Bart Schaefer
2013-04-28 15:30           ` Yuri D'Elia
2013-04-29  1:03             ` Bart Schaefer
2013-04-29  1:59               ` Bart Schaefer
2013-05-05  0:01               ` Frank Terbeck
2013-05-05  6:52                 ` Bart Schaefer [this message]
2013-05-05  9:38                   ` Frank Terbeck
2013-05-05 17:53                     ` Bart Schaefer
2013-05-05 18:37                       ` Frank Terbeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7YJCF-d0X7_ahK1R3HCch1fsLs1eebACjoc0hF=3BUpAw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).