Mail Archives: djgpp/1998/12/17/10:22:40
> Eli Zaretskii writes:
>> I think you can do it by using the signal handling mechanism to defer
>> the event into a protected mode exception, and then using setjmp() /
>> longjmp().
>
> True, but the original poster wanted to use task-switching to emulate
> things like fork(), and that's not possible with signals, since once you
> spawn another pogram, you are parked inside a real-mode DOS call, and all
> signals are effectively disabled until the child program exits.
A good point: I missed that part of the discussion. 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, but this is quite a hairy
assumption to make, and a big restriction on when the method could
be used...
Shawn Hargreaves.
- Raw text -