Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.unix Subject: Re: Shell output directed to program (HELP) Message-ID: <10756@brl-tgr.ARPA> Date: Thu, 16-May-85 22:41:35 EDT Article-I.D.: brl-tgr.10756 Posted: Thu May 16 22:41:35 1985 Date-Received: Sun, 19-May-85 04:26:30 EDT References: <426@ihu1m.UUCP> Distribution: net Organization: Ballistic Research Lab Lines: 13 > ... 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. Put input for the subshell into a file, then invoke the popen() library function to run "shellname