--- rxvt-unicode/src/init.C 2003/11/25 17:11:33 1.6 +++ rxvt-unicode/src/init.C 2003/11/27 10:12:10 1.8 @@ -1,7 +1,7 @@ /*--------------------------------*-C-*---------------------------------* * File: init.c *----------------------------------------------------------------------* - * $Id: init.C,v 1.6 2003/11/25 17:11:33 pcg Exp $ + * $Id: init.C,v 1.8 2003/11/27 10:12:10 pcg Exp $ * * All portions of code are copyright by their respective author/s. * Copyright (c) 1992 John Bovey, University of Kent at Canterbury @@ -475,6 +475,7 @@ close(i); } dup2(STDERR_FILENO, STDOUT_FILENO); +#if 0 // schmorp sayz closing filies is murder for (i = STDERR_FILENO + 1; i < R->num_fds; i++) { #ifdef __sgi /* Alex Coventry says we need 4 & 7 too */ if (i == 4 || i == 7) @@ -482,6 +483,7 @@ #endif close(i); } +#endif } /*----------------------------------------------------------------------*/ @@ -1301,27 +1303,8 @@ else #endif er = -1; - rxvt_get_ttymode(&(R->tio), er); - -/* install exit handler for cleanup */ -#ifdef HAVE_ATEXIT - atexit(rxvt_clean_exit); -#else -# ifdef HAVE_ON_EXIT - on_exit(rxvt_clean_exit, NULL); /* non-ANSI exit handler */ -# endif -#endif - signal(SIGHUP, rxvt_Exit_signal); -#ifndef __svr4__ - signal(SIGINT, rxvt_Exit_signal); -#endif - signal(SIGQUIT, rxvt_Exit_signal); - signal(SIGTERM, rxvt_Exit_signal); - signal(SIGCHLD, rxvt_Child_signal); - -/* need to trap SIGURG for SVR4 (Unixware) rlogin */ -/* signal (SIGURG, SIG_DFL); */ + rxvt_get_ttymode(&(R->tio), er); #ifndef __QNX__ /* spin off the command interpreter */ @@ -1415,17 +1398,17 @@ } /* reset signals and spin off the command interpreter */ - signal(SIGINT, SIG_DFL); - signal(SIGQUIT, SIG_DFL); - signal(SIGCHLD, SIG_DFL); + signal (SIGINT, SIG_DFL); + signal (SIGQUIT, SIG_DFL); + signal (SIGCHLD, SIG_DFL); /* * mimick login's behavior by disabling the job control signals * a shell that wants them can turn them back on */ #ifdef SIGTSTP - signal(SIGTSTP, SIG_IGN); - signal(SIGTTIN, SIG_IGN); - signal(SIGTTOU, SIG_IGN); + signal (SIGTSTP, SIG_IGN); + signal (SIGTTIN, SIG_IGN); + signal (SIGTTOU, SIG_IGN); #endif /* SIGTSTP */ /* set window size */