[comp.sys.atari.st.tech] GEMDOS dir/drive changing

rosenkra@convex.com (William Rosencranz) (01/29/91)

---
quick question:

if i Pexec a process, then within that process do a Dsetpath/Dsetdrv,
when i return from the Pexec, will the parent think it is back in the
same dir before the Pexec, or will the child's actions be
propagated back to the parent? in other words, is GEMDOS's concept
of current/default directory global in scope or is it per process?

if per process, where is this information stored?

reply via email, unless u feel this has more wide ranging interest...

thanx a priori.

-bill
rosenkra@convex.com

--
Bill Rosenkranz            |UUCP: {uunet,texsun}!convex!c1yankee!rosenkra
Convex Computer Corp.      |ARPA: rosenkra%c1yankee@convex.com

apratt@atari.UUCP (Allan Pratt) (01/30/91)

rosenkra@convex.com (William Rosencranz) writes:
>if i Pexec a process, then within that process do a Dsetpath/Dsetdrv,
>when i return from the Pexec, will the parent think it is back in the
>same dir before the Pexec, or will the child's actions be
>propagated back to the parent? in other words, is GEMDOS's concept
>of current/default directory global in scope or is it per process?

Why don't you try it?  The answer is that it's per-process.  The
information is stored partly internally in GEMDOS and partly in the
process' basepage (in the GEMDOS-private part).

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt

7103_2622@uwovax.uwo.ca (Eric Smith) (01/31/91)

In article <1991Jan29.005301.3620@convex.com>, rosenkra@convex.com (William Rosencranz) writes:
> if i Pexec a process, then within that process do a Dsetpath/Dsetdrv,
> when i return from the Pexec, will the parent think it is back in the
> same dir before the Pexec, or will the child's actions be
> propagated back to the parent? in other words, is GEMDOS's concept
> of current/default directory global in scope or is it per process?
> 
It's per process (unlike MSDOS, where it's global).

> if per process, where is this information stored?

Presumably, either in the basepage or on the stack. In MiNT, it's stored
in the process structure. In either case, trying to manipulate it is
highly non-portable and virtually guaranteed to break on some future
version of TOS/MiNT, not to mention RTX or MX2.
-- 
Eric R. Smith                     email:
Dept. of Mathematics            eric.smith@uwo.ca
University of Western Ontario   7103_2622@uwovax.bitnet