On Thu, 23 Sep 2004 09:42:20 +0800 Jim wrote:
JS>It makes sense to me now. Just one more question to fully clarify this
JS>matter. From the description from man page. I have feeling that I have
JS>to set the value of pid to "0" - which means to wait for any child
JS>process whose pr
material object. I deeply appreciate
all your help.
-Jim
-Original Message-
From: Robert Story (Users) [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 23, 2004 3:18 AM
To: Jim Su
Cc: [EMAIL PROTECTED]
Subject: Re: waitpid for child processes invoked from agent
On Mon, 20 Sep 2004 12:
On Mon, 20 Sep 2004 12:30:35 +0800 Jim wrote:
JS> I do have the waitpid() routine inside the sa_handler of the daemon
JS> which the snmpd get value from. The waitpid is as following - if
JS> (waitpid(-1, &status, WNOHANG) < 0) { return; }
That is your problem. WNOHANG means don't wait
8, 2004 1:15 AM
To: Jim Su
Cc: Net-Snmp-Users
Subject: Re: waitpid for child processes invoked from agent
On Mon, 13 Sep 2004 17:53:39 +0800 Jim wrote:
JS> ... in my daemon which forked child ...
A process is a child whose parent did not wait for it. If you want to
get rid of the defunct
On Mon, 13 Sep 2004 17:53:39 +0800 Jim wrote:
JS> ... in my daemon which forked child ...
A process is a child whose parent did not wait for it. If you want to
get rid of the defunct processes, you need to wait for the child, even in the
case of a timeout.
--
Robert Story; NET-SNMP Junkie
ge-
From: Jim Su [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 1:06 PM
To: Net-Snmp-Users
Subject: waitpid for child processes invoked from agent
Hi Greeting:
I have one stand alone program to call a API to open a socket to access data from
a daemon. The invoke to the API
riday, September 10, 2004 1:06 PM
To: Net-Snmp-Users
Subject: waitpid for child processes invoked from agent
Hi Greeting:
I have one stand alone program to call a API to open a socket to access data from
a daemon. The invoke to the API is child process of the daemon. This program works
fine.
Hi Greeting:
I have one stand alone program to call a API to open a socket to access data from
a daemon. The invoke to the API is child process of the daemon. This program works
fine.
Then I added the code of the program to my net-snmp agent module. The API is in
the library *.a file