www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/11/12/07:08:44

From: vischne AT ibm DOT net
Subject: Re: A non cygwin implementation of fork
12 Nov 1997 07:08:44 -0800 :
Message-ID: <199711121458.OAA92796.cygnus.gnu-win32@out2.ibm.net>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019