--- rxvt-unicode/src/init.C 2005/12/21 23:40:07 1.126 +++ rxvt-unicode/src/init.C 2005/12/23 14:46:34 1.127 @@ -1412,7 +1412,12 @@ if (rs[Rs_pty_fd]) { pty.pty = atoi (rs[Rs_pty_fd]); - fcntl (pty.pty, F_SETFL, O_NONBLOCK); + + if (getfd_hook) + pty.pty = (*getfd_hook) (pty.pty); + + if (pty.pty < 0 || fcntl (pty.pty, F_SETFL, O_NONBLOCK)) + rxvt_fatal ("unusable pty-fd filehandle, aborting.\n"); } else #endif