X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;h=c52531f53bac8626c065958458b84c7cae2725ea;hb=b7d3cb3244fc618a690efbdfa04137683396cf0d;hp=5c4e4e76609b9d637ace3622505c27304f19d618;hpb=e81a53afbf8fc88951cace52adc45bb02994fe55;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 5c4e4e76..c52531f5 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -413,7 +413,7 @@ int get_wait_shm(struct sock_info *sock_info, size_t mmap_size) * shared memory map will have been created. */ pid = wait(&status); - if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { + if (pid < 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) { wait_shm_fd = -1; goto end; }