Capturing a Program’s Return Value in Linux

As I wrote in last week’s Lesson, the system() function can’t be used in Linux to obtain a program’s return value. Instead, you must use one of the execl() family of functions. Further, this function must be spawned as a child process. This task involves using the fork() and wait() functions.
Continue reading