Article View: comp.sys.atari.st
Article #39544Another redirection question
From: Bob Rogers
Date: Sat, 16 Dec 1989 20:43
Date: Sat, 16 Dec 1989 20:43
18 lines
1127 bytes
1127 bytes
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?
--
----
Bob Rogers rogers@stpaul.ncr.com or rogers@pnet51.cts.com
NCR Comten, St. Paul, MN GEnie: R.C.ROGERS
Technical Details
Message-ID:
<1787@ncrcce.StPaul.NCR.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!ncrlnk!ncrcce!rogersShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!ncrlnk!ncrcce!rogers From: rogers@ncrcce.StPaul.NCR.COM (Bob Rogers) Newsgroups: comp.sys.atari.st Subject: Another redirection question Message-ID: <1787@ncrcce.StPaul.NCR.COM> Date: 16 Dec 89 20:43:40 GMT Organization: NCR Comten, Inc. Lines: 18