summaryrefslogtreecommitdiffstats
path: root/source/a/gpm/gpm-1.20.5-close-fds.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/gpm/gpm-1.20.5-close-fds.patch')
-rw-r--r--source/a/gpm/gpm-1.20.5-close-fds.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/a/gpm/gpm-1.20.5-close-fds.patch b/source/a/gpm/gpm-1.20.5-close-fds.patch
new file mode 100644
index 000000000..f33f07c55
--- /dev/null
+++ b/source/a/gpm/gpm-1.20.5-close-fds.patch
@@ -0,0 +1,17 @@
+diff -up gpm-1.20.5/src/daemon/startup.c.close-fds gpm-1.20.5/src/daemon/startup.c
+--- gpm-1.20.5/src/daemon/startup.c.close-fds 2008-06-13 10:08:19.000000000 +0200
++++ gpm-1.20.5/src/daemon/startup.c 2008-12-02 10:11:12.000000000 +0100
+@@ -135,6 +135,13 @@ void startup(int argc, char **argv)
+ check_uniqueness();
+ gpm_report(GPM_PR_INFO,GPM_MESS_STARTED);
+
++ // close extra fds
++ if (option.run_status == GPM_RUN_STARTUP ) {
++ close(0);
++ close(1);
++ close(2);
++ }
++
+ //return mouse_table[1].fd; /* the second is handled in the main() */
+
+ /****************** OLD CODE from gpn.c END ***********************/