[lug] p2open()? Yet another C++ question

Riggs, Rob RRiggs at doubleclick.net
Fri Aug 10 16:16:52 MDT 2001


There is a Python module called popen2.py (it should be in
/usr/lib/Python1.5) that does it in Python using Unix primitives, such as
pipe(), dup(), fork(), exec(), etc. You should easily be able to translate
that into C/C++ fairly quickly.

Or, hey, you could just write your code in Python instead. ;-)

-----Original Message-----
From: Scott A. Herod [mailto:herod at interact-tv.com]
Sent: Friday, August 10, 2001 3:57 PM
To: lug at lug.boulder.co.us
Subject: [lug] p2open()? Yet another C++ question


Hello,

On solaris and irix there is a p2open function that returns FILE
pointers
to both the input and output streams of a forked process.  This utility
function doesn't seem to exist with gcc in linux.  popen is only one
way.
Any pointers on how to link to both stdin and stdout of a child process?

Thanks

Scott
_______________________________________________
Web Page:  http://lug.boulder.co.us
Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug



More information about the LUG mailing list