🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #6357

default DTAs and subshells...beware!

#6357
From: RENT THIS SPACE
Date: Wed, 30 Apr 1986 01:43
16 lines
1297 bytes
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
Technical Details
Message-ID: <530@looking.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!looking!jan

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site looking.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!looking!jan
From: jan@looking.UUCP (RENT THIS SPACE)
Newsgroups: net.micro.pc
Subject: default DTAs and subshells...beware!
Message-ID: <530@looking.UUCP>
Date: Tue, 29-Apr-86 21:43:10 EDT
Article-I.D.: looking.530
Posted: Tue Apr 29 21:43:10 1986
Date-Received: Wed, 30-Apr-86 02:06:58 EDT
Distribution: net
Organization: Looking Glass Software Ltd. Waterloo, Ontario
Lines: 16