… | |
… | |
1402 | #if ENABLE_FRILLS |
1402 | #if ENABLE_FRILLS |
1403 | if (rs[Rs_pty_fd]) |
1403 | if (rs[Rs_pty_fd]) |
1404 | { |
1404 | { |
1405 | pty.pty = atoi (rs[Rs_pty_fd]); |
1405 | pty.pty = atoi (rs[Rs_pty_fd]); |
1406 | |
1406 | |
|
|
1407 | if (pty.pty >= 0) |
|
|
1408 | { |
1407 | if (getfd_hook) |
1409 | if (getfd_hook) |
1408 | pty.pty = (*getfd_hook) (pty.pty); |
1410 | pty.pty = (*getfd_hook) (pty.pty); |
1409 | |
1411 | |
1410 | if (pty.pty < 0 || fcntl (pty.pty, F_SETFL, O_NONBLOCK)) |
1412 | if (pty.pty < 0 || fcntl (pty.pty, F_SETFL, O_NONBLOCK)) |
1411 | rxvt_fatal ("unusable pty-fd filehandle, aborting.\n"); |
1413 | rxvt_fatal ("unusable pty-fd filehandle, aborting.\n"); |
|
|
1414 | } |
1412 | } |
1415 | } |
1413 | else |
1416 | else |
1414 | #endif |
1417 | #endif |
1415 | if (!pty.get ()) |
1418 | if (!pty.get ()) |
1416 | rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); |
1419 | rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); |