Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 13189 - pidof -x fails with script name longer than 15 characters
pidof -x fails with script name longer than 15 characters
Product: Red Hat Linux
Classification: Retired
Component: SysVinit (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
: 14226 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2000-06-28 12:41 EDT by Ron Isaacson
Modified: 2014-03-16 22:14 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-07-20 03:26:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ron Isaacson 2000-06-28 12:41:56 EDT
If you run a {bourne, shell, etc.} script with a filename longer than 15 
characters, pidof -x will not find the running script.

To test, create a file called sleep.pl containing the following:

  sleep 60;

Then create two links to this file:

  ln -s sleep.pl 15xxxxxxxxxxxxx
  ln -s sleep.pl 16xxxxxxxxxxxxxx

Start the first script and look for its pid:

  ./15xxxxxxxxxxxxx &
  pidof -x 15xxxxxxxxxxxxx

pidof will return the correct pid of the running script. Then do the same 
with the second script:

  ./16xxxxxxxxxxxxxx &
  pidof -x 16xxxxxxxxxxxxxx

Now pidof returns nothing. This does not seem to be affected by the script 
interpreter, length of total path, or any other factors.
Comment 1 Bill Nottingham 2000-07-19 10:58:58 EDT
*** Bug 14226 has been marked as a duplicate of this bug. ***
Comment 2 Bill Nottingham 2000-07-20 03:26:29 EDT
It's because it's looking at the /proc/stat field for that process, and
the field name for the command line is truncated at 15 characters.
Comment 3 Bill Nottingham 2000-08-06 02:25:30 EDT
... and since the field name is coming from the kernel,
there's very little SysVinit can do about it.

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