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 wait on the child process and get its exit status. The system call is wait(pid), try to read about it.