jwt27 / djgpp-cvs

git mirror of cvs.delorie.com:/cvs/djgpp
http://www.delorie.com/djgpp/cvs.html
GNU General Public License v2.0
10 stars 7 forks source link

process: make descriptor leak work-around conditional #2

Closed stsp closed 4 years ago

stsp commented 4 years ago
This patch adds the __spawn_flags variable and __spawn_leak_workaround
flag to allow the software to control the leak work-around.
Previous behaviour was to always enable the work-around unless
the DPMI host is cwsdpmi.

Without this patch it is not possible to spawn a prot-mode TSR
program like 32rtm. djgpp treats it as a leak and wipes out of
memory. With this patch things work properly if the DPMI server
is smart enough to direct the control to prev client after 32rtm
TSRed. The problem is that 32rtm just jumps to the realmode exit
addr, so the DPMI server doesn't see the exit and may get confused
unless the special logic is implemented for that case (i.e. not all
DPMI servers treat that correctly even after that patch).
jwt27 commented 4 years ago

Thanks. I merged it on the other branch since I think cvsimport will break if I commit to master.