Untitled

 avatar
unknown
plain_text
4 years ago
250 B
4
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...