Bug 170928

Summary: initscripts - pidof calls with a non-existent option
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: bojan, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.85-42 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-17 23:49:43 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:

Description Michal Jaegermann 2005-10-15 21:54:08 UTC
Description of problem:

In /etc/rc.d/init.d/functions there are few calls to 'pidof' which look
like that:

      pid=`pidof -c -o $$ - .... `

The problem is that 'man pidof' does not mention '-c' and with /sbin/pidof
from SysVinit-2.85-41 this reacts like that:

       pidof: invalid options on command line!

without bothering to mention what valid options really are. 'pidof' is not
always called when starting and stoping services but when it is then one sees:

pidof: invalid options on command line!

pidof: invalid options on command line!

Starting RPC idmapd:                                       [  OK  ]

which is still "OK" but 

# service rpcidmapd stop
Shutting down RPC idmapd: pidof: invalid options on command line!

pidof: invalid options on command line!

                                                           [FAILED]

and this is actually the case and can be confirmed with pgrep.

Removing '-c' from pidof calls in 'functions' make things to work again.

Version-Release number of selected component (if applicable):
initscripts-8.17-1

How reproducible:
always

Comment 1 Bill Nottingham 2005-10-17 20:17:17 UTC
What SysVinit do you have installed?

Comment 2 Michal Jaegermann 2005-10-17 20:34:52 UTC
As I wrote in the original report - SysVinit-2.85-41.  After an update to
SysVinit-2.85-42 an option '-c' is accepted by 'pidof' again; but it does
not make it a tiniest bit more documented without diving into sources.
I guess I will write a bug report about that too.

Comment 3 Michal Jaegermann 2005-10-17 20:53:59 UTC
Ah, no!  I take "undocumented" back.  It was indeed undocumented on 'man pidof'
from SysVinit-2.85-41 but this is not the case with SysVinit-2.85-42 even
if "01 Sep 1998" in a footer of this manpage remains the same.

OTOH '/sbin/pidof -h' is totally numb and '/sbin/pidof --help' prints only
"pidof: invalid options on command line!".  Sigh!