repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 7c43c8c701d96deeabb712ae0aea59bcc31934c8: path_to: revision_to:
commit 7c43c8c701d96deeabb712ae0aea59bcc31934c8 Author: Emanuele GiaquintaDate: Tue Dec 20 02:52:39 2011 +0000 Set the pty fd non-blocking also when it is initialized using ptytty::get. diff --git a/src/init.C b/src/init.C
--- a/src/init.C
+++ b/src/init.C
@@ -1609,7 +1609,7 @@ rxvt_term::run_command (const char *const *argv)
if (getfd_hook)
pty->pty = (*getfd_hook) (pty->pty);
- if (pty->pty < 0 || fcntl (pty->pty, F_SETFL, O_NONBLOCK))
+ if (pty->pty < 0)
rxvt_fatal ("unusable pty-fd filehandle, aborting.\n");
}
}
@@ -1618,6 +1618,8 @@ rxvt_term::run_command (const char *const *argv)
if (!pty->get ())
rxvt_fatal ("can't initialize pseudo-tty, aborting.\n");
+ fcntl (pty->pty, F_SETFL, O_NONBLOCK);
+
struct termios tio = def_tio;
#ifndef NO_BACKSPACE_KEY
-----END OF PAGE-----