Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: precmd: write error: interrupted



On Sat, May 4, 2013 at 5:01 PM, Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>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;
 }


Messages sorted by: Reverse Date, Date, Thread, Author