Path: utzoo!attcan!uunet!decwrl!apple!vsi1!octopus!stever From: stever@Octopus.COM (Steve Resnick ) Newsgroups: comp.os.msdos.programmer Subject: Re: fork() under MS/DOS? Keywords: Turbo C, fork(), multitasking, MS/DOS Message-ID: <1990Sep17.190834.21412@Octopus.COM> Date: 17 Sep 90 19:08:34 GMT References: <58769@iuvax.cs.indiana.edu> Reply-To: stever@octopus.UUCP (Steve Resnick ) Organization: Octopus Enterprises, Cupertino CA Lines: 28 In article <58769@iuvax.cs.indiana.edu> bobmon@iuvax.cs.indiana.edu (RAMontante) writes: > >You should investigate the "spawn...()" family of functions in Turbo C. >(Also the "system()" function.) These functions spawn a child process, >and resume the parent upon the child's completion. > >You can't really create "fork()" semantics for MS-DOS, since it's >single-tasking. I think that as close as you could come, you can do >already with "spawn...()". Fork() might be more meaningful in a >multitasking environment such as Desqview or Windows gives you (isn't >Windows a multitasker now?), but that isn't really "under MS-DOS" as >the parent or child would have to know how to open another window to >run in. In DESQview a fork which works like the UNIX fork would not be possible. In windows I don't think so either, but I may be wrong. It is possible in both environments to start up copies of the same program, but not duplicate the same process (which, I believe, is what fork() does.) Just another side note... :) Steve . -- ---------------------------------------------------------------------------- steve.resnick@f105.n143.z1@FIDONET.ORG #include Flames, grammar errors, spelling errrors >/dev/nul ----------------------------------------------------------------------------