X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Futils.c;h=5ea337450ecf63e8fc1f19b6e7e336804e869f68;hb=a74934bae19f96845f7af4b95a8fae5c2f860747;hp=07f29adedcebc0570c81bc153fe07769991b4e69;hpb=81b8677518a0a8836d0b17e5c2a7fb43382a44c1;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/utils.c b/src/bin/lttng-sessiond/utils.c index 07f29aded..5ea337450 100644 --- a/src/bin/lttng-sessiond/utils.c +++ b/src/bin/lttng-sessiond/utils.c @@ -31,7 +31,14 @@ int notify_thread_pipe(int wpipe) { int ret; - ret = write(wpipe, "!", 1); + /* Ignore if the pipe is invalid. */ + if (wpipe < 0) { + return 0; + } + + do { + ret = write(wpipe, "!", 1); + } while (ret < 0 && errno == EINTR); if (ret < 0) { PERROR("write poll pipe"); }