I know that it is possible to read commands output with a pipe? But what about getting return value ? For example i want to execute:
execl(\"/bin/ping\", \"/
You can use waitpid to get the exit status of you child process as:
waitpid
int childExitStatus; waitpid( pID, &childExitStatus, 0); // where pID is the process ID of the child.