Mail Archives: djgpp/1998/12/17/10:33:58
> Eli Zaretskii writes:
> > You could still
> > implement a signal-based version of fork() when spawning a djgpp
> > program from another djgpp application, since that can be done
> > without ever bothering to invoke DOS
>
> How? The only way I know is to use the debug interface (v2loadimage).
> Is that what you had in mind?
Yes, or something similar to that. Is there any reason why this
wouldn't work? It is a nasty method because the child process
would be running in the same DPMI application space as the parent,
so you wouldn't get any of the nice OS services like automatic
freeing of resources on exit, faults would tend to kill both
processes at the same time, and libc would need some heavy
tweaking to understand how to implement sbrk() and how to handle
program termination in this situation, but I think it should be
possible.
I'm not seriously suggesting to do this: it is a very messy and
awkward solution. But I think it would be theoretically possible,
if someone needed a fork() routine badly enough...
Shawn Hargreaves.
- Raw text -