Article View: comp.sys.atari.st
Article #39586Re: Another redirection question
From: Piet van Oostrum
Date: Mon, 18 Dec 1989 13:47
Date: Mon, 18 Dec 1989 13:47
22 lines
1647 bytes
1647 bytes
In article <1787@ncrcce.StPaul.NCR.COM>, rogers@ncrcce (Bob Rogers) writes:
`I've modified the MicroEMACS that came with the Mark Williams C compiler to
`read standard input (e.g., you can put it at the end of the pipe and then
`view/edit the stuff that came out the pipe). Is there any way to re-connect
`the console to standard input so that a program (which itself used standard
`input) run from within the editor via system() will operate correctly?
`
`In UNIX this is done by:
` tty = open("/dev/tty", 0);
` close(0);
` dup(tty);
` system("whatever"); /* "whatever" now has access to proper stdin */
`
`I've tried a similar technique using the ST's "con:" device in place of
`/dev/tty but to no avail. Can anyone offer a solution?
Fforce (0, -1) or Fforce (0, Fopen ("con:", 0));
--
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31-30-531806 Uucp: uunet!mcsun!hp4nl!ruuinf!piet
Telefax: +31-30-513791 Internet: piet@cs.ruu.nl (*`Pete')
Technical Details
Message-ID:
<2183@ruuinf.cs.ruu.nl>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!uunet!mcsun!hp4nl!ruuinf!cs.ruu.nlReferences:
<1787@ncrcce.StPaul.NCR.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!uunet!mcsun!hp4nl!ruuinf!cs.ruu.nl From: piet@cs.ruu.nl (Piet van Oostrum) Newsgroups: comp.sys.atari.st Subject: Re: Another redirection question Message-ID: <2183@ruuinf.cs.ruu.nl> Date: 18 Dec 89 13:47:41 GMT References: <1787@ncrcce.StPaul.NCR.COM> Sender: news@ruuinf.cs.ruu.nl Reply-To: piet@cs.ruu.nl (Piet van Oostrum) Organization: Dept of Computer Science, Utrecht University, The Netherlands Lines: 22 In-reply-to: rogers@ncrcce.StPaul.NCR.COM (Bob Rogers)