Bug 170928 - initscripts - pidof calls with a non-existent option
initscripts - pidof calls with a non-existent option
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-15 17:54 EDT by Michal Jaegermann
Modified: 2014-03-16 22:56 EDT (History)
2 users (show)

See Also:
Fixed In Version: 2.85-42
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-17 19:49:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2005-10-15 17:54:08 EDT
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 16:17:17 EDT
What SysVinit do you have installed?
Comment 2 Michal Jaegermann 2005-10-17 16:34:52 EDT
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 16:53:59 EDT
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!

Note You need to log in before you can comment on or make changes to this bug.