KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Consider this code snippet: pid_t cpid = fork(); if (cpid == -1) { perror("fork"); exit(EXIT_FAILURE); } if (cpid == 0) { // in child execvp(argv[1], argv + 1); perror("execvp"); _exit(EXIT_FAILURE); } // in parent How shall I exit the child process if execvp returns? Shall I use exit() or _exit()?
Tags (comma-separated)
Save Edits
Cancel