If I pipe the rpm output to another command, it sometimes happens that rpm
does not close the pipe correctly. The other command will wait forever
while rpm already terminated.
For example. Suppose you have
installed and you say
rpm -vF gpm-1.19.3-7.i386.rpm gpm-devel-1.19.3-7.i386.rpm | grep gpm
then rpm will finish but grep waits forever.
This defect is considered MUST-FIX for Florence Gold release
This is a gpm packaging problem, verifed by doing
rpm -Fv --noscripts gpm* | grep gpm
It happens with other packages as well.
For example with:
Could it be that this is related to #18988 ?
I still think this is an rpm and not a gpm/openssh/packaging problem.
I just had another look at the problem. The gpm daemon still has the pipe open
after rpm has quit. However, since gmp is restarted as
service gpm stop >/dev/null 2>&
in the post script, it doesn't have the pipe as STDOUT/ERR but /dev/null. So
where did it get it
still an RPM issue.
Again, I repeat:
If you install gpm with --noscripts, the install does not "hang". That means
problem is in packaging, and the fix is in packaging, and the bug report needs
be against the package(s), not rpm, as there's no way that I can "fix" (i.e. by
execution environment of rpm scriptlets) without introducing legacy
incompatibilities (i.e. by
changing the execution environment of rpm scriptlets) at this point in a release
So, back to gpm, which needs to close open file descriptors when starting as
Please open separate bugs for the "me too" packages, as this bug is about gpm,
unclear whether the other packages have this or another problem.
This defect has been removed from the Florence Gold MUST-FIX list
My guess is the following: Rpm redirects stdout/err but keeps a copy of the
original stdout/err so it can be restored later. Then it does a fork and the
child execs the script. However, the
child does forget to close the copy of the filehandle and so all subsequent
processes inherit it.
looking through the code, it looks like there are several reasons that stderr isn't
closed during startup of gpm. Here's a comment:
/* FIXME: stderr must be closed at this point, as protocol init needs it */
As this bug isn't critical, and it seems we might introduce more problems than we
solve by messing with the code, I'm closing this WONTFIX.
*** Bug 36400 has been marked as a duplicate of this bug. ***