Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Process Class wrapper for pipes in windows/linux
Process Class wrapper for pipes in windows/linux [message #11162] |
Fri, 24 August 2007 15:56 |
yeus
Messages: 19 Registered: October 2006
|
Promising Member |
|
|
does something like this already exist in ultimate++? If not, will it be added some time?
Some class, which wraps redirecting of streams between pipes stdout/int, sterr, creating your won streams to communicate between processes using pipes..
(I am mainly talking about a wrapper for the windows-api-function _popen(...), and the posix standart functions popen(...)
Greetings, Tom
|
|
|
|
Re: Process Class wrapper for pipes in windows/linux [message #11193 is a reply to message #11162] |
Sun, 26 August 2007 17:53 |
yeus
Messages: 19 Registered: October 2006
|
Promising Member |
|
|
thx... i have looked through the sources.. but i still have no clue how to use SlaveProcess... Somehow it gives me An error all the time, becuase Slave process is pure virtual, although iI am using "StartLocalProcess" and such stuff... I must admit: I have no clue, how SlaveProcess works ^^.
What would i need to do to achieve something like this with UPP:
FILE pipe=_popen("gnuplot.exe","w"); //start process
fprintf(pipe,"plot sin(x) \n"); //execute command in remote process
fflush(pipe);
_pclose(pipe);
greetings, Tom
[Updated on: Sun, 26 August 2007 17:53] Report message to a moderator
|
|
|
|
|
|
Re: Process Class wrapper for pipes in windows/linux [message #11204 is a reply to message #11202] |
Mon, 27 August 2007 16:14 |
yeus
Messages: 19 Registered: October 2006
|
Promising Member |
|
|
hmmm.... I made some further research and it seems that the Slaveprocess functions somehow interfere with the Sleep() function of U++...
All i can say is: as soon as I avoid using the Sleep function everything works just as expected...
Form the moment on, when I call the sleep function, the "pipe" object somehow gets disconnected from the process it owns, and I can not use the write, kill, read or whatever command then anymore....
greetings, Tom
[Updated on: Mon, 27 August 2007 17:15] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Tue May 21 20:20:54 CEST 2024
Total time taken to generate the page: 0.02680 seconds
|