Untitled

Anonymous
plain_text
12/01/2021 4:45 PM
336 B
20
Indexable

int status;

if (waitpid(pid, &status, 0) == -1) {
    perror("waitpid failed");
    goto cleanup;
}

if (WEXITSTATUS(status) != 0) {
    fprintf(stderr, "Child proccess exited with non-zero exit code %d", WEXITSTATUS(status));
    goto cleanup;
}

Editor is loading...