View Single Post
Old Dec 29th, 2006, 10:58 PM   #6
niteice
Programmer
 
niteice's Avatar
 
Join Date: Aug 2005
Posts: 98
Rep Power: 4 niteice is on a distinguished road
Send a message via AIM to niteice
exec() returns whatever the program prints on stdout. So if your program is:
#include <stdio.h>

int main(int argc, char **argv)
{
    fputs("Hello, world!\n", stdout);
}
The return value of exec() is "Hello, world!\n".
niteice is offline   Reply With Quote