[Nagiosplug-devel] [ nagiosplug-Bugs-1250191 ] ECHILD in waitpid (popen.c:spclose)
SourceForge.net
noreply at sourceforge.net
Fri Sep 2 04:05:46 CEST 2005
Bugs item #1250191, was opened at 2005-08-02 08:39
Message generated for change (Comment added) made by seanius
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1250191&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: General plugin execution
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: Peter Pramberger (peterpramb)
>Assigned to: M. Sean Finney (seanius)
Summary: ECHILD in waitpid (popen.c:spclose)
Initial Comment:
After installing Nagios 2.0b3 and plugins 1.4/1.4.1 on
a CentOS 4.1 machine (a RedHat ES 4.1 clone,
kernel-2.6.9, glibc-2.3.4) I found that the check_dns
plugin always aborts with "DNS WARNING - nslookup
returned error status" except in the first run.
However running it in verbose mode always shows a
successful nslookup output. After some debugging I
found that the waitpid call in popen.c:spclose()
returns a ECHILD, which triggers a failure return value
to be passed back to check_dns.
Cacthing the ECHILD always produces a reasonable
output, so the child with nslookup is really working.
>From the (linux) manpage: ECHILD if the process
specified in pid does not exist or is not a child of
the calling process. (This can happen for one's own
child if the action for SIGCHLD is set to SIG_IGN. See
also the LINUX NOTES section about threads.)
Shouldn't waitpid be successful in reading the exit
status of the child? Maybe a bug in glibc?
Anyone else seen this?
----------------------------------------------------------------------
>Comment By: M. Sean Finney (seanius)
Date: 2005-09-02 07:03
Message:
Logged In: YES
user_id=226838
ECHLD is returned in this context when the child has already
exited, and shouldn't be treated as an error. i'll commit a
change to cvs shortly.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1250191&group_id=29880
More information about the Devel
mailing list