projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng-ust-comm: wait on wrong child process
[lttng-ust.git]
/
src
/
lib
/
lttng-ust
/
lttng-ust-comm.c
diff --git
a/src/lib/lttng-ust/lttng-ust-comm.c
b/src/lib/lttng-ust/lttng-ust-comm.c
index 0fe2da466ad1cce241b0b82efd864e651223341e..7903550f5cfc32c599f46ba49e7f6f8d3327615d 100644
(file)
--- a/
src/lib/lttng-ust/lttng-ust-comm.c
+++ b/
src/lib/lttng-ust/lttng-ust-comm.c
@@
-1584,14
+1584,14
@@
open_write:
pid = fork();
URCU_TLS(lttng_ust_nest_count)--;
if (pid > 0) {
pid = fork();
URCU_TLS(lttng_ust_nest_count)--;
if (pid > 0) {
- int status;
+ int status
, wait_ret
;
/*
* Parent: wait for child to return, in which case the
* shared memory map will have been created.
*/
/*
* Parent: wait for child to return, in which case the
* shared memory map will have been created.
*/
-
pid = wait(&status
);
- if (
pid
< 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
+
wait_ret = waitpid(pid, &status, 0
);
+ if (
wait_ret
< 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
wait_shm_fd = -1;
goto end;
}
wait_shm_fd = -1;
goto end;
}
This page took
0.024343 seconds
and
4
git commands to generate.