Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!jpotter From: jpotter@ucs.adelaide.edu.au (Jonathan Potter) Newsgroups: comp.sys.amiga.programmer Subject: Re: SAS C Stack Question Message-ID: <2858@sirius.ucs.adelaide.edu.au> Date: 15 Apr 91 16:09:29 GMT References: Organization: Information Technology Division, The University of Adelaide, AUSTRALIA Lines: 25 In article lordbah@amusing.uucp (Jeff Van Epps) writes: >I have a program which runs in the foreground, doing I/O to the console >it was started from. How can I guarantee from within the code that the >program gets started with a stack >= some given size? The manuals give >an example for linking with (cres.o or cback.o, forget which), but this >program runs in foreground and is currently not eligible for resident. > >-------------------------------------------------------------------- > Jeff Van Epps uunet!amusing!lordbah I know its not exactly what you want, but you could just CHECK to see that you had enough stack, and if not, abort with an error message. To do this : struct Process *myproc; myproc=(struct Process *)FindTask(0); if (myproc->pr_StackSize