]> git.pld-linux.org Git - packages/crossfire.git/commitdiff
using "/" as STDIN, STDOUT and STDERR isn't a good idea
authorArtur Frysiak <artur@frysiak.net>
Sun, 4 Feb 2007 13:33:39 +0000 (13:33 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    crossfire-daemon.patch -> 1.1

crossfire-daemon.patch [new file with mode: 0644]

diff --git a/crossfire-daemon.patch b/crossfire-daemon.patch
new file mode 100644 (file)
index 0000000..2e89a67
--- /dev/null
@@ -0,0 +1,15 @@
+--- crossfire-1.9.1/server/daemon.c.wig2       2006-05-13 08:32:14.000000000 +0200
++++ crossfire-1.9.1/server/daemon.c    2007-02-04 14:22:56.000000000 +0100
+@@ -103,9 +103,9 @@
+     /*
+      * Set up the standard file descriptors.
+      */
+-    (void) open ("/", O_RDONLY);      /* root inode already in core */
+-    (void) dup2 (0, 1);
+-    (void) dup2 (0, 2);
++    (void) open ("/dev/null", O_RDONLY);      /* root inode already in core */
++    (void) dup2 (fileno(logfile), 1);
++    (void) dup2 (fileno(logfile), 2);
+     if ((i = open ("/dev/tty", O_RDWR)) >= 0) {       /* did open succeed? */
+ #if (defined(SYSV) || defined(hpux)) && defined(TIOCTTY)
This page took 0.054749 seconds and 4 git commands to generate.