- fix a bug where gpm daemon kept stdin/out/err open after detaching from
terminal, causing eg. pipes from initscript to hang for the lifetime of gpm
This commit is contained in:
parent
cebc19cd99
commit
4e9de1e65f
14
gpm-1.20.1-close-fds.patch
Normal file
14
gpm-1.20.1-close-fds.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- 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 */
|
||||
}
|
9
gpm.spec
9
gpm.spec
@ -1,7 +1,7 @@
|
||||
Summary: A mouse server for the Linux console.
|
||||
Name: gpm
|
||||
Version: 1.20.1
|
||||
Release: 74.1
|
||||
Release: 75
|
||||
License: GPL
|
||||
Group: System Environment/Daemons
|
||||
Source: http://ftp.linux.it/pub/People/rubini/gpm/%{name}-%{version}.tar.gz
|
||||
@ -19,6 +19,7 @@ Patch18: gpm-1.20.1-consolename.patch
|
||||
Patch19: gpm-1.20.1-multilib.patch
|
||||
Patch20: gpm-1.20.1-no-console-error.patch
|
||||
Patch21: gpm-1.20.1-lib-silent.patch
|
||||
Patch22: gpm-1.20.1-close-fds.patch
|
||||
|
||||
Prereq: /sbin/chkconfig /sbin/ldconfig /sbin/install-info
|
||||
Requires: bash >= 2.0
|
||||
@ -62,6 +63,7 @@ mouse button.
|
||||
%patch19 -p1 -b .multilib
|
||||
%patch20 -p1 -b .no-console-error
|
||||
%patch21 -p1 -b .lib-silent
|
||||
%patch22 -p1 -b .close-fds
|
||||
|
||||
%build
|
||||
autoconf
|
||||
@ -178,6 +180,11 @@ fi
|
||||
%{_libdir}/libgpm.so
|
||||
|
||||
%changelog
|
||||
* Fri Sep 22 2006 Petr Rockai <prockai@redhat.com> - 1.20.1-75
|
||||
- fix a bug where gpm daemon kept stdin/out/err open after
|
||||
detaching from terminal, causing eg. pipes from initscript
|
||||
to hang for the lifetime of gpm
|
||||
|
||||
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.20.1-74.1
|
||||
- rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user