Bug 170928 - initscripts - pidof calls with a non-existent option
Summary: initscripts - pidof calls with a non-existent option
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
(Show other bugs)
Version: 4
Hardware: All Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2005-10-15 21:54 UTC by Michal Jaegermann
Modified: 2014-03-17 02:56 UTC (History)
2 users (show)

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

Attachments (Terms of Use)

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!


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):

How reproducible:

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!

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