Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site reed.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!vax135!cornell!uw-beaver!tektronix!reed!alexis From: alexis@reed.UUCP (Alexis Dimitriadis) Newsgroups: net.unix Subject: Re: Shell output directed to program (HELP) Message-ID: <1551@reed.UUCP> Date: Mon, 20-May-85 20:59:03 EDT Article-I.D.: reed.1551 Posted: Mon May 20 20:59:03 1985 Date-Received: Wed, 22-May-85 02:06:38 EDT References: <426@ihu1m.UUCP> <10756@brl-tgr.ARPA> Reply-To: alexis@reed.UUCP (Alexis Dimitriadis) Distribution: net Organization: Reed College, Portland, Oregon Lines: 28 > > ... I need to know if there is a way > > to pass strings input to this program to the shell > > for execution (such as pwd or cd etc.) and have > > the resulting output from the shell directed back > > to the program ... > > Sure, but you have to be careful. Trying to attach pipes > for both input & output from the subshell is too hard, > since the possibility of deadlock exists. [...] Also, this will break may programs that modify their behavior when their input or output is/is not a terminal. (e.g. csh, ls, more, etc.). If your system has ptys, (pseudo-ttys) you should use them. They appear as /dev/pty* if you have them. -- _______________________________________________ As soon as I get a full time job, the opinions expressed above will attach themselves to my employer, who will never be rid of them again. alexis @ reed ...teneron! \ ...seismo!ihnp4! - tektronix! - reed.UUCP ...decvax! /