Re: [ilugd] Waiting for a child to die

2005-12-25 Thread Gora Mohanty
Mayank Jain [EMAIL PROTECTED] wrote: On 12/25/05, Gora Mohanty wrote: Um, what do you mean by a non-blocking wait. Calling wait()/waitpid() means that you *want* the parent process to wait for the child to finish processing (or, some other condition occurs, as specified in the 3rd

Re: [ilugd] Waiting for a child to die

2005-12-24 Thread Gora Mohanty
Mayank Jain [EMAIL PROTECTED] wrote: [Code, and successful experiment deleted] However, how do i make this wait by the parent a non-blocking wait? Um, what do you mean by a non-blocking wait. Calling wait()/waitpid() means that you *want* the parent process to wait for the child to

Re: [ilugd] Waiting for a child to die

2005-12-24 Thread Ritesh Raj Sarraf
Your subject line got me really confused. :-) rrs On Sat, 24 Dec 2005, Mayank Jain wrote: #include unistd.h #include sys/types.h #include stdio.h #include sys/wait.h int main() { pid_t child = 0; int status = 0; printf(forking!\n); child = fork();

Re: [ilugd] Waiting for a child to die

2005-12-24 Thread Mayank Jain
On 12/25/05, Gora Mohanty [EMAIL PROTECTED] wrote: Mayank Jain [EMAIL PROTECTED] wrote: [Code, and successful experiment deleted] However, how do i make this wait by the parent a non-blocking wait? Um, what do you mean by a non-blocking wait. Calling wait()/waitpid() means that you

Re: [ilugd] Waiting for a child to die

2005-12-24 Thread [EMAIL PROTECTED]
Ritesh Raj Sarraf wrote: Your subject line got me really confused. :-) rrs Same here it got me quite upset actually. ram ___ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at:

Re: [ilugd] Waiting for a child to die

2005-12-24 Thread Manish Malik
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mayank Jain wrote: waitpid(child, status, 0); if(WIFEXITED(status)) { printf(Child exited\n); break;