By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,148 Members | 1,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,148 IT Pros & Developers. It's quick & easy.

popen() equivalent

P: n/a
Hello all,

Is there an iostream equivalent to cstdio's popen()?

Is there a way to change a FILE * into an iostream?

Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Grumble" <in*****@kma.eu.org> wrote in message
news:bp**********@news-rocq.inria.fr...
Hello all,

Is there an iostream equivalent to cstdio's popen()?
There is no such function as 'popen' in either standard C
or C++.

Is there a way to change a FILE * into an iostream?


No.

-Mike
Jul 22 '05 #2

P: n/a

"Grumble" <in*****@kma.eu.org> wrote in message news:bp**********@news-rocq.inria.fr...
Hello all,

Is there an iostream equivalent to cstdio's popen()?


1. popen() is a system call (UNIX), it is not function from libc or another C library.

2. Look at C++ wrapper around popen() :
* http://alexvn.freeservers.com/s1/popen.html
* http://alexvn.freeservers.com/s1/download.html (C++-wrapper around popen)
* http://www.simtel.net/product.php?id=61570

[snip]

--
=====================================
Alex Vinokur
mailto:al****@connect.to
http://mathforum.org/library/view/10978.html
news://news.gmane.org/gmane.comp.lang.c++.perfometer
=====================================

Jul 22 '05 #3

P: n/a
Alex Vinokur wrote:
Grumble wrote:
Is there an iostream equivalent to cstdio's popen()?


1. popen() is a system call (UNIX), it is not function from libc
or another C library.


popen() is definitely not a system call, but I understand why it
might not be part of any _standard_ library.

What confused me is that FreeBSD and Linux both provide popen() and
pclose() within libc (stdio to be precise).

http://www.freebsd.org/cgi/man.cgi?query=popen
http://www.sonic.net/cgi-bin/man?popen

Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.