Bug 883857
Summary: | lsb-defined pidofproc function has false positives | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Lukáš Nykrýn <lnykryn> |
Component: | sysvinit | Assignee: | Lukáš Nykrýn <lnykryn> |
Status: | CLOSED ERRATA | QA Contact: | Tereza Cerna <tcerna> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 6.5 | CC: | dannf, initscripts-maint-list, lnykryn, msekleta, ovasik, psklenar, tcerna, tlavigne |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | sysvinit-2.87-6.dsf.el6 | Doc Type: | Bug Fix |
Doc Text: |
Cause: Usually initscript has the same name as deamon. Due to this reason when we are looking for the PID of the deamon based on its name from a initscript we have to exclude the initscript itself. But if the initcript have started something in the subprocess this process again have the same name and can be falsely recognized as daemon itself.
Consequence:
pidofproc will not return the pid of the daemon
Fix:
Use the new -m option in pidof which excludes other similar processes.
Result:
Daemon pid should be determined correctly.
see https://bugzilla.redhat.com/show_bug.cgi?id=883856
|
Story Points: | --- |
Clone Of: | 883856 | Environment: | |
Last Closed: | 2015-07-22 07:04:23 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 883856, 947782, 1159825 |
Description
Lukáš Nykrýn
2012-12-05 12:45:18 UTC
======================================== Verified in version: sysvinit-tools-2.87-6.dsf.el6.x86_64 initscripts-9.03.40-2.el6.x86_64 PASSED ======================================== # cp /bin/sleep . # sleep 3600 & [1] 9264 # sleep 3600 & [2] 9265 # ./sleep 3600 & [3] 9266 # ./sleep 3600 & [4] 9267 # pidof sleep 9267 9266 9265 9264 # pidof sleep -o 9265 9267 9266 9264 # pidof sleep 9267 9266 9265 9264 # pidof sleep -o 9265 -m 9267 9266 # ======================================== Reproduced in version: sysvinit-tools-2.87-5.dsf.el6.x86_64 initscripts-9.03.40-2.el6.x86_64 FAIL ======================================== # cp /bin/sleep . # sleep 3600 & [1] 9164 # sleep 3600 & [2] 9165 # ./sleep 3600 & [3] 9166 # ./sleep 3600 & [4] 9167 # pidof sleep 9167 9166 9165 9164 # pidof -o 9165 sleep 9167 9166 9164 # pidof -o 9165 sleep -m pidof: invalid options on command line! # Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1362.html |