help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Octave's popen2 function -- does it work?


From: Stuart Brorson
Subject: Octave's popen2 function -- does it work?
Date: Sat, 15 Apr 2006 15:05:52 -0400 (EDT)

Hi --

I'm trying to use popen2 to open a pipe to another program, and then
send/receive commands from the other program.  However, I haven't
gotten it to work.

I can receive (and print out) the opening spew from the other program,
but then when I try to send commands to the other program, and read
the results of my commands, I get nothing back.

Questions:

*  Is "popen2" known to work?  Or is it perhaps known to fail, but
stays in the Octave distro for historical reasons.  (Yes, this happens
sometimes ...)

*  Does anybody have an example they could share showing a working
example of popen2?  The examples in the Octave docmuentation fail for
me.

*  I am wondering if my problem has to do with the way I/O is
buffered and flushed from my other program.  Do any of you Octave
gurus have insight into how one should implement a bidirectional pipe
in C++/unix?   

Pointers to useful and informative websites would be very welcome.

Thanks!

Stuart



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]