|
发表于 2003-12-11 11:43:00
|
显示全部楼层
fork a child and invoke "system" to excute your program.
in the parent process,invoke "wait" or "waitpid" to get the "status".
/* pid_t wait(int * status) ; pid_t waitpid(pid_t pid,int * status,int options); */
last,use macro "WIFEXITED(status)" to get the value.
you can find these in APUE. |
|