Re: waitpid for child processes invoked from agent

2004-09-27 Thread Users
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

RE: waitpid for child processes invoked from agent

2004-09-22 Thread Jim Su
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:

Re: waitpid for child processes invoked from agent

2004-09-22 Thread Users
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

RE: waitpid for child processes invoked from agent

2004-09-19 Thread Jim Su
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

Re: waitpid for child processes invoked from agent

2004-09-17 Thread Users
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

RE: waitpid for child processes invoked from agent

2004-09-13 Thread Jim Su
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

RE: waitpid for child processes invoked from agent

2004-09-12 Thread Jim Su
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.

waitpid for child processes invoked from agent

2004-09-09 Thread Jim Su
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