Red Hat Bugzilla – Bug 83401
checkpid function doesn't work for multiple pids
Last modified: 2014-03-16 22:34:04 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.1) Gecko/20020912
Description of problem:
The comment before checkpid in /etc/rc.d/init.d/functions says
that it is supposed to work for multiple pids, but it returns
as soon as it finds any pid that is running. This isn't a problem
in practice because it is never invoked with more than one pid.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
$ cd /etc/rc.d/init.d
$ . functions
$ checkpid 1 10000
$ echo $?
$ checkpid 10000
$ echo $?
Expected Results: checkpid should return 0 if all of the pids are running
and 1 otherwise
The code should be
# Check if $pid (could be plural) are running
for i in $* ; do
[ -d "/proc/$i" ] || return 1
Fixed in cvs, will be in 7.07-1. Thanks!
An errata has been issued which should help the problem described in this bug report.
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen
this bug report if the solution does not work for you.