Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!batcomputer!munnari.oz.au!brolga!bunyip.cc.uq.oz.au!marlin.jcu.edu.au!cpca From: cpca@marlin.jcu.edu.au (Colin Adams) Newsgroups: comp.sys.amiga.programmer Subject: Re: C questions (again) Summary: yo, still no answers Message-ID: <1991Mar12.062355.25085@marlin.jcu.edu.au> Date: 12 Mar 91 06:23:55 GMT References: <1991Feb7.114348.10577@marlin.jcu.edu.au> <18cd34bd.ARN078b@germal.han.de> Organization: James Cook University of North Queensland Lines: 59 In article <18cd34bd.ARN078b@germal.han.de> gm@germal.han.de (Gerald Malitz) writes: >Hey, funny things happen. Type `prompt "%N.%S> "' before you >start program1. See what happened after program1 "ended"? The >CLI-Number changed (usually incremented by one). Enter >`endcli' and there it is :-). program1 didn't really end, >it's still inside Execute, which reads commands from input. >That's why it didn't print your message. > >There are several ways to fix it. You can call > Execute("program2\nendcli", input, 0) Hmm. I have been having problems with my alias's dissappearing, maybe this is the cause of it. I'll try it. >or you can call > Execute("program2", 0, 0) Nahh. Doesn't work properly. >In later case program2 has no stdin (or nil: as stdin or something >like that), so it has to open * to read from. Or you can call > Execute("program2 <*", 0, 0) > >BTW you needn't open dos.library yourself, it's done by SAS-startup- >code in c.o. If you do it yourself, you should do it right calling >OpenLibrary("dos.library", 0) (or whatever version you need). The >first answer I got from program1 was "Open lib failed". Yeah, I know now. I typed program1 from memory so I'm not surprised there was a minor problem with it. The problem is that I cannot touch the programs that I am calling with Execute() because it must work with all programs. I must come up with a way to run any program from my program and get it's i/o to work in the CLI without stuffing my own program up. Execute() doesn't seem to be the answer. > >Hm, I'm late with it, no too late, I hope. No still no answers. I did get a reply from a C= employee but the account was trashed before I could read it. I've tried using LoadSeg and CreateProc, but I/O is a problem... Seems C= really don't want you to try and write your own shell. I'm going to look at the source for Csh and if that doesn't help, I'll hastle the net until someone works it out :-) > Best regards > >Please avoid replies from outside of .de, thanks. >-- > // Gerald Malitz, Bolchentwete 4, 3300 Braunschweig, Voice: +49 531 796832 >\X/ UUCP: gm@germal.han.de Mittagspause von 0.30 bis 23.45 Uhr -- Colin Adams JCU Computer Science Department Shadowplay (Amiga Developers) Internet : cpca@marlin.jcu.edu.au