[comp.sys.amiga.programmer] Execute

dewolfe@ug.cs.dal.ca (Anarchy for Peace) (03/25/91)

Does anybody have any information on how to launch an application with
a large stack using the routines in dos.library?  I am trying to launch a
raytracer (rayshade 4.0) from my program with a large stack (~800000)
but I can't seem to get it.

Someone around before mentioned a call called "System()" but my AmigaDOS
manual has nothing about this...  What does it do and what does it have to
offer?

--
Colin DeWolfe
dewolfe@ug.cs.dal.ca

jesup@cbmvax.commodore.com (Randell Jesup) (03/25/91)

In article <1991Mar24.204707.4098@cs.dal.ca> dewolfe@ug.cs.dal.ca (Anarchy for Peace) writes:
>Does anybody have any information on how to launch an application with
>a large stack using the routines in dos.library?  I am trying to launch a
>raytracer (rayshade 4.0) from my program with a large stack (~800000)
>but I can't seem to get it.

	Execute("stack 80000\nrayshade blah...",...)

>Someone around before mentioned a call called "System()" but my AmigaDOS
>manual has nothing about this...  What does it do and what does it have to
>offer?

	It's a far more useful replacement for Execute() in 2.0.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com  BIX: rjesup  
Thus spake the Master Ninjei: "To program a million-line operating system
is easy, to change a man's temperament is more difficult."
(From "The Zen of Programming")  ;-)

jpotter@ucs.adelaide.edu.au (Jonathan Potter) (04/09/91)

I was wondering if anyone can give me some advice on Execute().
Basically, my problem is this: In a Directory Utility I have written, I
want to be able to a) Run programs with no output window, b) Run programs
with output, c) if possible, Run programs with output & input, d) Run
programs asynchronously, and e) if possible, Run programs async. with output
(& input)

Now, a basic Execute() call works fine with most programs for a) and b),
and if I prefix the commandstring with c:run, it works fine for d).

Is there any easy way to get c) working, but NOT have to type "endcli" to
get the window to close afterwards?

On a similar, but different note, is there anyway to get programs
launched via Execute() to inherit YOUR current directory, and not what I
assume is the default (boot) directory.

I have tried using the arp.library's ASyncRun() routine, as this allows
you to inherit the current dir., as well as have output & input for async.
programs, and also allows you to set the stack & priority. However, there
seem to be quite a lot of programs that do not run from ASyncRun() at all,
so the disadvantages outweigh the advantages.

Do programs launched with Execute() inherit your stack size & priority?


I have been tackling this one on & off for the last 2 months or so, and I
would really appreciate any advice anyone can give me. Thanks!

Jon

/----------------------------------------------------------------------------\
| Jonathan Potter  |                             | Life is like a piece of   |
| P.O. Box 289     | jpotter@itd.adelaide.edu.au |   spinach...              |
| Goodwood, SA     | FidoNet : 3:680/829         |                           |
| Australia  5034  |                             | Sort of green and wrinkly |
\----------------------------------------------------------------------------/

-- 
| Jonathan Potter  |                             | Life is like a piece of   |
| P.O. Box 289     | jpotter@itd.adelaide.edu.au |   spinach...              |
| Goodwood, SA     | FidoNet : 3:680/829         |                           |
| Australia  5034  |                             | Sort of green and wrinkly |

peterk@cbmger.UUCP (Peter Kittel GERMANY) (04/09/91)

In article <2788@sirius.ucs.adelaide.edu.au> jpotter@ucs.adelaide.edu.au (Jonathan Potter) writes:
>I was wondering if anyone can give me some advice on Execute().
>Basically, my problem is this: In a Directory Utility I have written, I
>want to be able to a) Run programs with no output window, b) Run programs
>with output, c) if possible, Run programs with output & input, d) Run
>programs asynchronously, and e) if possible, Run programs async. with output
>(& input)

There are told to exist very elegant ways to accomplish this by very
deep digging into the system. I (being a little lazy to study all this :-)
recommend the easy way: Put your command line into a temporary file in
ram:, add an endcli line, and with Execute() then call a
newshell con:... from tempfile
Thus you can easily control the window this is running in. For the current
directory, you could simply put another line with a CD before your comm.
line in that tempfile.
Perhaps when you issue this with run >nil: newshell..., you avoid getting
two windows opened.
And don't forget to clean up and delete that temp file sometimes afterwards.

-- 
Best regards, Dr. Peter Kittel  // E-Mail to  \\  Only my personal opinions... 
Commodore Frankfurt, Germany  \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk