From: Rob McCool
Newsgroups: netscape.devs-nsapi
Subject: Re: fork1() simulation on SGI 2.0 NSAPI
Date: Thu, 19 Dec 1996 13:52:13 -0800
Prasanna Gopinath wrote:
>
> I am trying to simulate fork1() on SGI. Please recall that fork1()
> duplicates only calling thread in the child process. I saw
> a simiar call in daemon.h --> child_fork()
>
> /*
> * fork is a wrapper for the system's fork function. This closes the
> listen
> * socket for the mob. This also makes sure that a threaded daemon only
> gets
> * the calling thread and not all of them.
> */
>
> NSAPI_PUBLIC pid_t child_fork(void);
>
> My question is it possible to get the same behaviour as fork1() on
> Solaris by just replacing fork() with child_fork()??.
>
> OR is there any mechanism on SGI by which I can do it?
Yes, child_fork() should do what you want.
--
--
Rob McCool, robm@netscape.com http://home.netscape.com/people/robm/
Stunt Programmer, Netscape Communications Corporation
It was working ten minutes ago, I swear...
Reproduced by permission of the author.