473,394 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

running another program from a C++ program

Hi

I'd like to run a program from a running C++ program (i.e. spanning a
new process) and would like to have access to its standard input and
standard output and error (possibily via streams).

I know about the popen posix function but that's not very flexible...
is there a C++ way?

thanks in advance
Lorenzo
Sep 23 '05 #1
3 1584
Lorenzo Bettini wrote:
Hi

I'd like to run a program from a running C++ program (i.e. spanning a
new process) and would like to have access to its standard input and
standard output and error (possibily via streams).

I know about the popen posix function but that's not very flexible...
is there a C++ way?

thanks in advance
Lorenzo


Nope, it's system dependent. I'd recommend either comp.unix.programmer
(based on your posix comment), or comp.windows.ms.programmer for win32.

Sep 23 '05 #2
Lorenzo Bettini wrote:
I'd like to run a program from a running C++ program (i.e. spanning a
new process) and would like to have access to its standard input and
standard output and error (possibily via streams).

I know about the popen posix function but that's not very flexible...
is there a C++ way?


No. All those things are platform-specific.

V
Sep 23 '05 #3
red floyd wrote:
Lorenzo Bettini wrote:
Hi

I'd like to run a program from a running C++ program (i.e. spanning a
new process) and would like to have access to its standard input and
standard output and error (possibily via streams).

I know about the popen posix function but that's not very flexible...
is there a C++ way?

thanks in advance
Lorenzo

Nope, it's system dependent. I'd recommend either comp.unix.programmer
(based on your posix comment), or comp.windows.ms.programmer for win32.


Indeed I found
http://doc.trolltech.com/3.3/qprocess.html
since I'm using QT

thanks anyway
cheers
Lorenzo
Sep 24 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Fabio Pliger | last post by:
Hi, is it possibile, in python, to check for an already running instance of an application? My problem is that, if my program i running and the user relaunch it, i don't want to open a new...
6
by: Pierre-Yves | last post by:
Hello, I would like to prevent my perl program to be executed several times simultaneously (if the program is already running, I would like to display a message like "another instance of this...
10
by: Amit Nath | last post by:
Hi! I am running a C program and need to pause the program and change some of the variables. Is there any function that checks if there is a character in the Standard Input Buffer, else the...
7
by: MgGuigg | last post by:
Hello all, This is my first time posting a question to this forum, so here is hoping I am following protocol. I am scraping the rust off my old Basic programming skills, and have just recently...
12
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
9
by: Michael.Suarez | last post by:
Suppose I have a program that prompts you with a dialogbox to enter a password. If you get the password correct, it allows you into the program, else it kills the program. Suppose that when I...
6
by: dspfun | last post by:
I would like to analyze my running c-program. What I would like to know for example is the range of the entire address space of my running c-program (memory reserved for/by the running program),...
2
by: upperclass | last post by:
Hi, I'm trying to find a decent way to measure program running time. I know clock() is probably the standard way of doing it but clock_t overflows too quickly. The target program running time...
9
by: Jimmy | last post by:
Well, i know it may be a little non-python thing, however, I can think of no place better to post this question :) can anyone tell me, in python, how to obtain some information of a running...
12
by: Shadlan | last post by:
Hi. I need to know if a service is running on my server. Is there any PHP instruction that I can use to do this?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.