[Nagiosplug-devel] [ nagiosplug-Bugs-1250191 ] ECHILD in waitpid (popen.c:spclose)

SourceForge.net noreply at sourceforge.net
Tue Aug 2 05:43:18 CEST 2005


Bugs item #1250191, was opened at 2005-08-02 14:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: None
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: Peter Pramberger (peterpramb)
Assigned to: Nobody/Anonymous (nobody)
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?


----------------------------------------------------------------------

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