summaryrefslogtreecommitdiff
path: root/gpm-1.20.5-close-fds.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-05 02:17:39 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-05 02:17:39 +0000
commit9d5165866832c84d122aefd4ecf4f244a58a1568 (patch)
tree2744509894b854661a2563e05a425bfd535f0e0e /gpm-1.20.5-close-fds.patch
parent38bccab72afcaa731ea88a9beb69caf667f31762 (diff)
automatic import of gpmopeneuler24.03_LTS
Diffstat (limited to 'gpm-1.20.5-close-fds.patch')
-rw-r--r--gpm-1.20.5-close-fds.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/gpm-1.20.5-close-fds.patch b/gpm-1.20.5-close-fds.patch
new file mode 100644
index 0000000..f33f07c
--- /dev/null
+++ b/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 ***********************/