[net.micro.pc] default DTAs and subshells...beware!

jan@looking.UUCP (RENT THIS SPACE) (04/30/86)

I was using the default disk transfer address ($80 into the psp) for
find first/find next, and running a subshell using the system() routine
in the Microsoft C library.  I discovered to my horror that when the
system() returns, the dta for my program, as returned by the getdta dos
call, had been changed to the dta of the subshell.

Subsequent find first/find next calls write on the area where the
subshell's dta lived.  If your program grows (using the dos setblock
call) into that area, it can be stomped on by find first/find next!

Moral: always make (and set) your own dta, don't count on the default one.


The surgeon general warns that DOS can be dangerous to your sanity.

Jan Gray	Looking Glass Software, Waterloo, Ont.	    (519) 884-7473