From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Description of problem: Capturing the output of an rpm installation (backticking `rpm ...` in shell or perl, for example) may hang indefinitely if rpm's %post script launches a long-running process -- even if that process closes it's stdout. %post scripts (and perhaps others, too) inherit a dup'd copy of their stdout. Version-Release number of selected component (if applicable): rpm-4.2.2-0.14 How reproducible: Always Steps to Reproduce: 1. Make a dummy RPM (no source, no files) with the following: %post sleep 10 >/dev/null & ls -l /proc/$$/fd > /tmp/fdtest-post.$$ 2. Build the rpm, and install it under backticks # FOO=`rpm -Uhv dummyrpm...` 3. Inspect the resultant /tmp/fdtest-post.$$ file Actual Results: /tmp/fdtest-post.$$ contained: total 0 lr-x------ 1 root root 64 Nov 11 11:13 0 -> pipe:[181105] l-wx------ 1 root root 64 Nov 11 11:13 1 -> pipe:[181081] l-wx------ 1 root root 64 Nov 11 11:13 14 -> pipe:[181081] lrwx------ 1 root root 64 Nov 11 11:13 2 -> /dev/pts/3 lr-x------ 1 root root 64 Nov 11 11:13 255 -> /var/tmp/rpm-tmp.57281 also, $FOO assignment took about 10 seconds. Expected Results: /tmp/fdtest-post.$$ should not have had shown a line for a dup of fd 1 (fd 14, in the "Actual Results"). $FOO assignment should have taken no longer than it takes for the rpm command to exit. Additional info:
This is fixed in rpm-4.3.x, all open file desciptors 3->100 are closed.
NEEDINFO_ENG has been deprecated in favor of NEEDINFO or ASSIGNED. Changing status to ASSIGNED for ENG review.
This bug is filed against RHEL 3, which is in maintenance phase. During the maintenance phase, only security errata and select mission critical bug fixes will be released for enterprise products. Since this bug does not meet that criteria, it is now being closed. For more information of the RHEL errata support policy, please visit: http://www.redhat.com/security/updates/errata/ If you feel this bug is indeed mission critical, please contact your support representative. You may be asked to provide detailed information on how this bug is affecting you.