From d8c4247d1797c6a4bb931b6b15a679bd082c3d62 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 15:44:10 +0000 Subject: Apply patch gpm-1.20.5-close-fds.patch patch_name: gpm-1.20.5-close-fds.patch present_in_specfile: true --- diff --git a/src/daemon/startup.c b/src/daemon/startup.c index 1d00255..4d85e8c 100644 --- a/src/daemon/startup.c +++ b/src/daemon/startup.c @@ -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 ***********************/