delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/15/16:20:59

Date: Fri, 15 Jul 1994 15:53:04 -0400 (EDT)
From: SGW46959M021 AT DAFFY DOT MILLERSV DOT EDU
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: fork()

S. Walizer writes:

		Just a curiosity question: are there any future plans to
	incorporate a functional fork() into djgpp? Maybe in 2.0? It seems to
	me the necessary features could be incorporated into go32. I would
	attempt it myself, but I know my skills and time are not up to the
	task.

Perhaps we have different ideas of what a "functional fork()" is.  On
UNIX, fork() creates a copy of the running process.  Since DOS is not
a multitasking OS, I don't see how this could be done for DJGPP.

Dave

It is entirely possible to accomplish under DOS. Multitasking can be done
outside of the OS, as packages such as CTask indicate. All you would have
to do is save the status vector in go32 and swap in the new process. This
requires a large amount of programming, ie a procedure to stave the current
status, a timer to control when processes are switched in and out, etc. etc.

You seem to forget that an OS is not magic, just a piece of software, and that
just about anything that can be accomplished in an OS can be accomplished
in a seperate program as well.

						S. Walizer

- Raw text -


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