gpm/gpm-1.20.1-close-fds.patch

15 lines
505 B
Diff
Raw Normal View History

--- 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 */
}