#include #include #include #include void err_sys(char * msg) { printf("%s \n", msg); exit(-1); } int main(void) { pid_t pid; if ( (pid = fork()) < 0) err_sys("fork error"); else if (pid == 0){ /* child */ system("ping 200.1.17.73"); exit(0); } /* parent */ exit(0); }