home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 12736 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  2.3 KB

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