This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A non cygwin implementation of fork


Then there is the following, which looks plausible for some versions of C;
The only question is where does the inline function return to exactly?

#include <stddef.h>
#include <process.h>

unsigned long fork ()
{
/* I'm not sure if this works for all flavors of c: */
 return _beginthread(
  (_USERENTRY (*)(void *))((void *){return 0L;}),
  4096, (void *)NULL);
}


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]