"Enright, Brian" wrote:
> I am trying to fork another process from within a running pth thread, in
> order to make a call to a exec.. function.  Apparently when the process is
> swaped out the entire parent (ie. threaded libary)  goes with it?  not sure
> what I am doing wrong.  (also tried fork instaid of pth_fork).
> 
> Here is a code sample:
> 
>         .
>         .
>         .
> child_process = pth_fork();
> 
> if (child_process == 0) {
>   execv(.......);
>   exit(0);
> }
> 
> waitpid(child_process, &status, WUNTRACED);                    /* wait for
> child to exit gracefully   */

Not sure if this is the problem or not, but wouldn't you need
to call pth_waitpid() instead of waitpid()?

-Archie
 
__________________________________________________________________________
Archie Cobbs     *     Packet Design     *     http://www.packetdesign.com
______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to