This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / A dumb C++ question.I need excute a external binary, then read the results when it is ready, and excute the external binary agian and so on. How can I do that in C++?
-ding_ding(丁_丁);
2006-12-11
{146}
(#3371222@0)
-
If you use ShellExecuteEx(...) in Windows and set the fMask flag to SEE_MASK_NOCLOSEPROCESS, then you should get the the process handle of the WinZip process. Then you can use WaitForSingleObject and wait until the process has completed.In UNIX you can use spawn() and join() to wait for the external binary's completion and then read its results.
-vicky2005(孩子她爹);
2006-12-11
{111}
(#3371277@0)
-
Thanks, it is so helpful. I am in linux.If I want spawn the jobs across mulitpul CPUs on the nework, is there a simple way to do or I need LSF or some other tools?
-ding_ding(丁_丁);
2006-12-11
{123}
(#3371291@0)
-
That is an interesting topic. But I don't have an answer for you now.
-vicky2005(孩子她爹);
2006-12-11
(#3371320@0)
-
you can use mono (.Net on Linux) to develop remoting application and run it on different machine.
-holdon(again);
2006-12-12
(#3372550@0)
-
pipe? using popen.
-iunknown(Internet);
2006-12-12
(#3372558@0)
-
你是想CALL一个EXTERNAL LIBRARY(.so)里面的函数还是要调用一个LINUX程序?
-googleabcd(古狗);
2006-12-14
(#3377771@0)
-
for C: 1. fork/exec; 2. system(), 3.popen
-647i(流浪的步行万里);
2006-12-14
(#3378342@0)
-
Nothing with C++, just fork and call, if you need read output, you may need dup2() function
-bugkiller(Driver Coding);
2006-12-15
(#3379593@0)