On Wed, 2005-Mar-30 14:17:43 -0400, zean zean wrote:
>Excuse for my badly English.  which is the best form to wait  the
>finish of execution of a child.

That's virtually impossible to answer as a general case.  The best
form depends on exactly what you want to do.

>My idea is:
>
>pid_t chilpid;
>
>while(childpid != wait(&status))
>;


If you want to wait for a specific pid, look at waitpid() or wait4():
        if (waitpid(childpid, &status, 0) == -1) {
                handle error
        }

-- 
Peter Jeremy
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to