Berkeley CSUA MOTD:Entry 16594
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/28 [General] UID:1000 Activity:popular
5/28    

1999/9/25 [Uncategorized] UID:16594 Activity:nil
9/25    fork/exec question:

        I have a standard fork/exec in my code:

        pid_t pid;
        if ((pid = fork()) < 0) {
          perror("fork");
        } else if (pid == 0){
          setsid();
          execvp(args[0],args);
          perror(args[0]);
          _exit(127);
        }