ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/init.C
(Generate patch)

Comparing rxvt-unicode/src/init.C (file contents):
Revision 1.240 by ayin, Sat Jan 19 13:05:55 2008 UTC vs.
Revision 1.244 by ayin, Sat Jan 26 14:24:43 2008 UTC

10 * Copyright (c) 1996 Chuck Blake <cblake@BBN.COM> 10 * Copyright (c) 1996 Chuck Blake <cblake@BBN.COM>
11 * Copyright (c) 1997 mj olesen <olesen@me.queensu.ca> 11 * Copyright (c) 1997 mj olesen <olesen@me.queensu.ca>
12 * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> 12 * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de>
13 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> 13 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com>
14 * - extensive modifications 14 * - extensive modifications
15 * Copyright (c) 2003-2007 Marc Lehmann <pcg@goof.com> 15 * Copyright (c) 2003-2008 Marc Lehmann <pcg@goof.com>
16 * 16 *
17 * This program is free software; you can redistribute it and/or modify 17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by 18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or 19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version. 20 * (at your option) any later version.
308 set_option (Opt_secondaryScreen); 308 set_option (Opt_secondaryScreen);
309 set_option (Opt_secondaryScroll); 309 set_option (Opt_secondaryScroll);
310 set_option (Opt_pastableTabs); 310 set_option (Opt_pastableTabs);
311 set_option (Opt_intensityStyles); 311 set_option (Opt_intensityStyles);
312 set_option (Opt_iso14755_52); 312 set_option (Opt_iso14755_52);
313 set_option (Opt_buffered);
313} 314}
314 315
315static void 316static void
316init_secondary () 317init_secondary ()
317{ 318{
318 int i; 319 int i;
319 320
320 /*
321 * Close all unused file descriptors
322 * We don't want them, we don't need them.
323 */
324 if ((i = open ("/dev/null", O_RDONLY)) < 0) 321 if ((i = open ("/dev/null", O_RDONLY)) < 0)
325 { 322 {
326 /* TODO: BOO HISS */
327 dup2 (STDERR_FILENO, STDIN_FILENO); 323 dup2 (STDERR_FILENO, STDIN_FILENO);
328 } 324 }
329 else if (i != STDIN_FILENO) 325 else if (i != STDIN_FILENO)
330 { 326 {
331 dup2 (i, STDIN_FILENO); 327 dup2 (i, STDIN_FILENO);
332 close (i); 328 close (i);
333 } 329 }
334 330
335 dup2 (STDERR_FILENO, STDOUT_FILENO); 331 dup2 (STDERR_FILENO, STDOUT_FILENO);
336
337#if 0 // schmorp sayz closing filies is murder
338 for (i = STDERR_FILENO + 1; i < num_fds; i++)
339 {
340#ifdef __sgi /* Alex Coventry says we need 4 & 7 too */
341 if (i == 4 || i == 7)
342 continue;
343#endif
344 close (i);
345 }
346#endif
347} 332}
348 333
349/*----------------------------------------------------------------------*/ 334/*----------------------------------------------------------------------*/
350const char ** 335const char **
351rxvt_term::init_resources (int argc, const char *const *argv) 336rxvt_term::init_resources (int argc, const char *const *argv)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines