… | |
… | |
558 | set_option (Opt_iso14755); |
558 | set_option (Opt_iso14755); |
559 | set_option (Opt_iso14755_52); |
559 | set_option (Opt_iso14755_52); |
560 | set_option (Opt_buffered); |
560 | set_option (Opt_buffered); |
561 | } |
561 | } |
562 | |
562 | |
563 | static void |
|
|
564 | init_secondary () |
|
|
565 | { |
|
|
566 | int i; |
|
|
567 | |
|
|
568 | if ((i = open ("/dev/null", O_RDONLY)) < 0) |
|
|
569 | { |
|
|
570 | dup2 (STDERR_FILENO, STDIN_FILENO); |
|
|
571 | } |
|
|
572 | else if (i != STDIN_FILENO) |
|
|
573 | { |
|
|
574 | dup2 (i, STDIN_FILENO); |
|
|
575 | close (i); |
|
|
576 | } |
|
|
577 | |
|
|
578 | dup2 (STDERR_FILENO, STDOUT_FILENO); |
|
|
579 | } |
|
|
580 | |
|
|
581 | /*----------------------------------------------------------------------*/ |
563 | /*----------------------------------------------------------------------*/ |
582 | const char ** |
564 | const char ** |
583 | rxvt_term::init_resources (int argc, const char *const *argv) |
565 | rxvt_term::init_resources (int argc, const char *const *argv) |
584 | { |
566 | { |
585 | int i, r_argc; |
567 | int i, r_argc; |
… | |
… | |
790 | set_locale (""); |
772 | set_locale (""); |
791 | set_environ (envv); // a few things in X do not call setlocale :( |
773 | set_environ (envv); // a few things in X do not call setlocale :( |
792 | |
774 | |
793 | init_vars (); |
775 | init_vars (); |
794 | |
776 | |
795 | init_secondary (); |
|
|
796 | |
|
|
797 | const char **cmd_argv = init_resources (argc, argv); |
777 | const char **cmd_argv = init_resources (argc, argv); |
798 | |
778 | |
799 | #ifdef KEYSYM_RESOURCE |
779 | #ifdef KEYSYM_RESOURCE |
800 | keyboard->register_done (); |
780 | keyboard->register_done (); |
801 | #endif |
781 | #endif |