![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can a child process return a specific value to a parent process ? | Ametis1970 | High Level Programming | 8 | 04-10-2008 12:22 AM |
| Return code of background process | c19h28O2 | Shell Programming and Scripting | 3 | 04-06-2008 12:46 PM |
| return code of a process | filedeliver | High Level Programming | 1 | 04-19-2007 02:42 AM |
| return code of a process | filedeliver | UNIX for Advanced & Expert Users | 1 | 04-18-2007 04:27 PM |
| background process return code | Vikas Sood | Shell Programming and Scripting | 5 | 06-10-2006 10:25 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
getting the return code of forked child process (ftp)
Hi,
From within my C++ program, I fork a child process and execl an ftp session (solaris), like this : std::string szStartCmd = "ftp -i -n -v 192.168.149.31"; int nExecRes = execl("/bin/sh", "sh", "-c", szStartCmd.c_str(), (char *)0); I use 2 pipes to communicate between my parent process and the ftp. But I'm not sure if it's possible to catch the output of the solaris ftp in a pipe, so that I can use it in my parent process. Until now I've only used uni-directional communication between parent and child process. Getting commands from my parent to the ftp process works fine, but the ftp output is just printed on the screen. I would like to "catch" it in my parent process. Does anyone know if this is possible ? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|