… | |
… | |
762 | * @ DISPLAY: in case we started with -display |
762 | * @ DISPLAY: in case we started with -display |
763 | * @ WINDOWID: X window id number of the window |
763 | * @ WINDOWID: X window id number of the window |
764 | * @ COLORTERM: terminal sub-name and also indicates its color |
764 | * @ COLORTERM: terminal sub-name and also indicates its color |
765 | * @ TERM: terminal name |
765 | * @ TERM: terminal name |
766 | * @ TERMINFO: path to terminfo directory |
766 | * @ TERMINFO: path to terminfo directory |
|
|
767 | * @ COLORFGBG: fg;bg color codes |
767 | */ |
768 | */ |
768 | putenv (env_display); |
769 | putenv (env_display); |
769 | putenv (env_windowid); |
770 | putenv (env_windowid); |
|
|
771 | if (env_colorfgbg) |
|
|
772 | putenv (env_colorfgbg); |
770 | |
773 | |
771 | #ifdef RXVT_TERMINFO |
774 | #ifdef RXVT_TERMINFO |
772 | putenv ("TERMINFO=" RXVT_TERMINFO); |
775 | putenv ("TERMINFO=" RXVT_TERMINFO); |
773 | #endif |
776 | #endif |
774 | |
777 | |
… | |
… | |
1361 | rxvt_print_error ("can't fork"); |
1364 | rxvt_print_error ("can't fork"); |
1362 | return -1; |
1365 | return -1; |
1363 | case 0: |
1366 | case 0: |
1364 | close (cfd); /* only keep tty_fd and STDERR open */ |
1367 | close (cfd); /* only keep tty_fd and STDERR open */ |
1365 | |
1368 | |
|
|
1369 | init_env (); |
|
|
1370 | |
1366 | if (rxvt_control_tty (tty_fd, ttydev) < 0) |
1371 | if (rxvt_control_tty (tty_fd, ttydev) < 0) |
1367 | rxvt_print_error ("could not obtain control of tty"); |
1372 | rxvt_print_error ("could not obtain control of tty"); |
1368 | else |
1373 | else |
1369 | { |
1374 | { |
1370 | /* Reopen stdin, stdout and stderr over the tty file descriptor */ |
1375 | /* Reopen stdin, stdout and stderr over the tty file descriptor */ |