Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!brolga!bunyip.cc.uq.oz.au!marlin.jcu.edu.au!glmwc From: glmwc@marlin.jcu.edu.au (Matt Crowd) Newsgroups: comp.sys.amiga.programmer Subject: Re: C questions (again) Summary: Are there any real Amiga gurus here? Message-ID: <1991Feb9.045758.29446@marlin.jcu.edu.au> Date: 9 Feb 91 04:57:58 GMT References: <1991Feb7.114348.10577@marlin.jcu.edu.au> <1991Feb7.224940.27921@jato.jpl.nasa.gov> Organization: James Cook University of North Queensland Lines: 44 In article <1991Feb7.224940.27921@jato.jpl.nasa.gov> jdickson@jato.Jpl.Nasa.Gov (Jeff Dickson) writes: >In article <1991Feb7.114348.10577@marlin.jcu.edu.au> glmwc@marlin.jcu.edu.au (Matt Crowd) writes: >> printf("This is program 1!\n"); >> Execute("program2",input,0); // run program2 >> printf("Because of something very wierd, this line " >> "will not be printed. I do not know why.\n"); > > I remember something mentioned about Execute() being asynchronous. >I think it was in some message that favorably compared it with System() >under 2.0. It is not. When your program calls Execute(), it goes to sleep >until Execute() is finished executing :-). It would be nice if an asynchro- >nous form were available. I guess the only way now is to prefix the command >string with "Run", but Execute() will return the result code of Run instead >of the result code of the program you ran. If System() under version 2.0 is >anything like the System() on UNIX systems - then no dice here either. > >>Colin Adams > > Jeff S. Dickson I don't think you quite understand what I meant. All I want to do is call a program written in SAS C 5.1 from another program written in SAS C 5.1 using the Execute/System call. However, after the 2nd program returns (it is synchronous), input and output goes into this huge black hole somewhere in the Amiga's memory. As there have been no replies, it seems nobody must have ever tried to do this before or nobody could get it to work. And nobody at C= seems to know either. Looks to me like either Execute or SAS I/O is pretty stuffed. I tried the same code on this UNIX DecStation system and it worked perfectly (using the system call instead of execute). I'd try System() if I knew how it worked. I'll check out the includes. Another one for the Yet-Another-Lattice-C-bug pile. BTW, does anyone know why SAS C 5.1 crashes when you use a lot of strings concatenated in a single file. Setting the stack to really huge makes no difference, but splitting the file up usually fixes the problem... Colin Adams.