home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!rutgers!cbmvax!jesup
- From: jesup@cbmvax.commodore.com (Randell Jesup)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: 1.2, 1.3, and 2.0 question
- Message-ID: <34672@cbmvax.commodore.com>
- Date: 27 Aug 92 01:34:01 GMT
- References: <50pK02Rt1f8X01@JUTS.ccc.amdahl.com> <64699@cup.portal.com>
- Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
- Organization: Commodore, West Chester, PA
- Lines: 39
-
- Tony-Preston@cup.portal.com (ANTHONY FRANCIS PRESTON) writes:
- >I am talking about is rather simple, an Execute(cmdline,0,0) call. The
- >command line simply runs a program(such as a door, or lha, or XPRD) and
- >returns when done. Typically, they are running a program with the I/O
- >redirected to the serial port with a modified aux-Handler(Fish #79 has
- >the program). The only variable here is an A500 with 1.2 versus an
- >A2000 with 2.1(my system). Some others running 2.04 do not have the
- >problem. Now, my questions are several:
- > 1) What determines the stack for the program run with "Execute" call?
-
- 4000. To change it, use a command line of "stack xxxx\n command".
- System() allows you to use NP_Stacksize to change the default stack.
-
- > 2) Does someone have an example of how to detect the amount of stack
- > you are using? How much you have been given?
-
- if (Cli())
- stacksize = Cli()->cli_DefaultStack * 4;
- else
- stacksize = ((struct Process *) FindTask(NULL))->pr_StackSize * 4;
-
- > 3) Is there some reason why a 2.04 compiled call to Execute() would
- > not run under 1.2 or 1.3? Is there something I can do about it?
-
- Yes: if the thing calling Execute() was launched from WB, Execute(
- command,0,0) will fail. The reason is that the output is supposed to go to
- "*", but 1.3 can't open "*" when started from WB. 2.0, if asked to open
- "*" from a WB-launched program, will instead open NIL:.
-
- If you don't care about the output of an execute call, always open
- NIL: for the output filehandle. This is safe in all cases.
-
- --
- "Rev on the redline, you're on your own; seems like a lifetime, but soon it's
- gone..." Foreigner
- -
- Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
- {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com BIX: rjesup
- Disclaimer: Nothing I say is anything other than my personal opinion.
-