X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=libringbuffer%2Fshm.c;h=6a77af6462a61d93a3c5c1bfb8fff214f546de62;hb=18c1cd87c54290691f0e6913f84c16fa5267b86d;hp=8f158e2f0507feeb8d05e000f08241a0e356b9e9;hpb=1d4981969313da002983ca979bd85c95493f7316;p=lttng-ust.git diff --git a/libringbuffer/shm.c b/libringbuffer/shm.c index 8f158e2f..6a77af64 100644 --- a/libringbuffer/shm.c +++ b/libringbuffer/shm.c @@ -49,6 +49,12 @@ struct shm_object *shm_object_table_append(struct shm_object_table *table, goto error_fcntl; } } + /* The write end of the pipe needs to be non-blocking */ + ret = fcntl(waitfd[1], F_SETFL, O_NONBLOCK); + if (ret < 0) { + PERROR("fcntl"); + goto error_fcntl; + } *obj->wait_fd = *waitfd; /* shm_fd: create shm */