Commit 5aa6d964 authored by Mike Hibler's avatar Mike Hibler
Browse files

Yes I'm an idiot: took me three tries to get opening a pty in non-blocking

mode correct.  It works now.  Really.
parent 276f492f
......@@ -514,7 +514,16 @@ shutdown(int sig)
if ((ptyfd = open(Ptyname, O_RDWR, 0666)) < 0)
die("open(%s) : %s", Ptyname, geterr(errno));
dup2(ptyfd, ofd);
/* XXX so we don't have to recompute the select mask */
if (ptyfd != ofd) {
dup2(ptyfd, ofd);
ptyfd = ofd;
if (fcntl(ptyfd, F_SETFL, O_NONBLOCK) < 0)
die("fcntl(O_NONBLOCK): %s", Ptyname, geterr(errno));
dolog(LOG_NOTICE, "pty reset");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment