Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 50739694720266203f5aeffcc3799d8e > files > 4

gpm-1.20.1-20mdv2008.1.src.rpm

--- gpm-1.20.1/src/startup.c.close-fds	2006-09-22 13:46:19.000000000 +0200
+++ gpm-1.20.1/src/startup.c	2006-09-22 13:46:44.000000000 +0200
@@ -97,6 +97,11 @@
    /* is changing to root needed, because of relative paths ? or can we just
     * remove and ignore it ?? FIXME */
    if (chdir("/") < 0) gpm_report(GPM_PR_OOPS,GPM_MESS_CHDIR_FAILED);
+
+   // close extra fds
+   close(0);
+   close(1);
+   close(2);
    
    atexit(gpm_exited);                          /* call gpm_exited at the end */
 }