Re: Interacting with subprocesses.
- From: Roberto Zunino <zunino cli di unipi it>
- To: lopresto writeme com
- cc: gnome-list gnome org, "recipient.list.not.shown":@cli.di.unipi.it
- Subject: Re: Interacting with subprocesses.
- Date: Sat, 17 Jul 1999 23:32:33 +0200 (MET DST)
On Sat, 17 Jul 1999 lopresto@writeme.com wrote:
> A friend and I are writing a program that spawns an external program and wants
> to be able to read data from its stdout, and send data to its stdin. Someone
> on the list suggested popen() for spawning a program and getting its output,
> and that's useful, but we also need to be able to send input. Sorry if the
> request is a bit vague; I'm just getting started and not sure exactly what I'm
> asking. TIA for any help.
> ----------------------------------------------------
> Adam Lopresto (lopresto@writeme.com)
> http://cec.wustl.edu/~adl4/
>
> Eschew obfuscation!
The stream returned by popen() permits both input and output: if you write
to that stream you send stuff to the stdin of the spawned process, if you
read from the same stream you receive from the stdout of it.
Further information is available in the popen(3) man page, in the info
documentation on libc, in the Linux Programmer's Guide, etc.
Regards,
Zun.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]