From: Eli Zaretskii Newsgroups: comp.os.msdos.djgpp Subject: Re: Question on process piping, redirection, etc... in C Date: Wed, 3 Nov 1999 09:59:42 +0200 Organization: NetVision Israel Lines: 13 Message-ID: References: NNTP-Posting-Host: is.elta.co.il Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: news.netvision.net.il 941615925 22596 199.203.121.2 (3 Nov 1999 07:58:45 GMT) X-Complaints-To: abuse AT netvision DOT net DOT il NNTP-Posting-Date: 3 Nov 1999 07:58:45 GMT X-Sender: eliz AT is In-Reply-To: To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 2 Nov 1999, Brian Chapman wrote: > in other words, i would like to do something much cleaner than the > following: > > system("program.exe -args > datafile.tmp"); > f=fopen("datafile.tmp","rt"); > if (!f) do_error(); > parse_file(f); > close(f); You want `popen'. Look it up in the library docs.