Bug#3201: screen ^a:exec ! doesn't clear TIOCPKT on filtered pty
I wrote:
> I'll try and send along a patch (if my guess about w_ptyfd is right,
> the comments in window.h seem to confirm this) but would appreciate
> other input.
This appears to work.
--- window.c~ Mon Nov 20 13:03:05 1995
+++ window.c Mon Jun 3 13:18:57 1996
@@ -880,6 +880,12 @@ char **av;
FreePseudowin(w);
return -1;
}
+ if (ioctl(w->w_ptyfd, TIOCPKT, (char *)&flag))
+ {
+ Msg(errno, "TIOCPKT ioctl on parent");
+ FreePseudowin(w);
+ return -1;
+ }
}
#endif /* TIOCPKT */
pwin->p_pid = ForkWindow(av, (char *)0, (char *)0, t, w);
@@ -903,6 +909,14 @@ struct win *w;
close(pwin->p_ptyfd);
free((char *)pwin);
w->w_pwin = NULL;
+#ifdef TIOCPKT
+ {
+ int flag = 1;
+
+ if (ioctl(w->w_ptyfd, TIOCPKT, (char *)&flag))
+ Msg(errno, "TIOCPKT reset on parent failed");
+ }
+#endif /* TIOCPKT */
}
#endif /* PSEUDOS */
Reply to: