… | |
… | |
225 | |
225 | |
226 | MEvent.time = CurrentTime; |
226 | MEvent.time = CurrentTime; |
227 | MEvent.button = AnyButton; |
227 | MEvent.button = AnyButton; |
228 | options = DEFAULT_OPTIONS; |
228 | options = DEFAULT_OPTIONS; |
229 | want_refresh = 1; |
229 | want_refresh = 1; |
230 | cmd_pid = -1; |
|
|
231 | pty.pty = pty.tty = -1; |
|
|
232 | priv_modes = SavedModes = PrivMode_Default; |
230 | priv_modes = SavedModes = PrivMode_Default; |
233 | TermWin.focus = 0; |
231 | TermWin.focus = 0; |
234 | TermWin.ncol = 80; |
232 | TermWin.ncol = 80; |
235 | TermWin.nrow = 24; |
233 | TermWin.nrow = 24; |
236 | TermWin.int_bwidth = INTERNALBORDERWIDTH; |
234 | TermWin.int_bwidth = INTERNALBORDERWIDTH; |
… | |
… | |
673 | if (scrollbar_visible ()) |
671 | if (scrollbar_visible ()) |
674 | { |
672 | { |
675 | priv_modes |= PrivMode_scrollBar; |
673 | priv_modes |= PrivMode_scrollBar; |
676 | SavedModes |= PrivMode_scrollBar; |
674 | SavedModes |= PrivMode_scrollBar; |
677 | } |
675 | } |
|
|
676 | |
678 | if (menubar_visible ()) |
677 | if (menubar_visible ()) |
679 | { |
678 | { |
680 | priv_modes |= PrivMode_menuBar; |
679 | priv_modes |= PrivMode_menuBar; |
681 | SavedModes |= PrivMode_menuBar; |
680 | SavedModes |= PrivMode_menuBar; |
682 | } |
681 | } |
… | |
… | |
1417 | * the slave. |
1416 | * the slave. |
1418 | */ |
1417 | */ |
1419 | void |
1418 | void |
1420 | rxvt_term::run_command (const char *const *argv) |
1419 | rxvt_term::run_command (const char *const *argv) |
1421 | { |
1420 | { |
|
|
1421 | #if ENABLE_FRILLS |
|
|
1422 | if (rs[Rs_pty_fd]) |
|
|
1423 | { |
|
|
1424 | pty.pty = atoi (rs[Rs_pty_fd]); |
|
|
1425 | fcntl (pty.pty, F_SETFL, O_NONBLOCK); |
|
|
1426 | } |
|
|
1427 | else |
|
|
1428 | #endif |
1422 | if (!pty.get ()) |
1429 | if (!pty.get ()) |
1423 | rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); |
1430 | rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); |
1424 | |
1431 | |
1425 | pty.set_utf8_mode (enc_utf8); |
1432 | pty.set_utf8_mode (enc_utf8); |
1426 | |
1433 | |
1427 | /* set initial window size */ |
1434 | /* set initial window size */ |
1428 | tt_winch (); |
1435 | tt_winch (); |
… | |
… | |
1438 | #endif |
1445 | #endif |
1439 | er = -1; |
1446 | er = -1; |
1440 | |
1447 | |
1441 | rxvt_get_ttymode (&tio, er); |
1448 | rxvt_get_ttymode (&tio, er); |
1442 | |
1449 | |
|
|
1450 | #if ENABLE_FRILLS |
|
|
1451 | if (rs[Rs_pty_fd]) |
|
|
1452 | return; |
|
|
1453 | #endif |
|
|
1454 | |
1443 | sw_chld.start (SIGCHLD); |
1455 | sw_chld.start (SIGCHLD); |
1444 | |
1456 | |
1445 | #ifndef __QNX__ |
1457 | #ifndef __QNX__ |
1446 | /* spin off the command interpreter */ |
1458 | /* spin off the command interpreter */ |
1447 | switch (cmd_pid = fork ()) |
1459 | switch (cmd_pid = fork ()) |
1448 | { |
1460 | { |
1449 | case -1: |
1461 | case -1: |
|
|
1462 | { |
|
|
1463 | cmd_pid = 0; |
1450 | rxvt_fatal ("can't fork, aborting.\n"); |
1464 | rxvt_fatal ("can't fork, aborting.\n"); |
|
|
1465 | } |
1451 | case 0: |
1466 | case 0: |
1452 | init_env (); |
1467 | init_env (); |
1453 | |
1468 | |
1454 | if (!pty.make_controlling_tty ()) |
1469 | if (!pty.make_controlling_tty ()) |
1455 | fprintf (stderr, "%s: could not obtain control of tty.", RESNAME); |
1470 | fprintf (stderr, "%s: could not obtain control of tty.", RESNAME); |