From: David Goulet Date: Tue, 18 Dec 2012 21:19:34 +0000 (-0500) Subject: Fix: sessiond write() to handle EINTR X-Git-Tag: v2.1.0~23 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fbb3b395a2bba6fb7ecdd85baf7f01cb5899d200;p=lttng-tools.git Fix: sessiond write() to handle EINTR Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 477a9413b..184ac6be6 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -1326,8 +1326,10 @@ static void *thread_dispatch_ust_registration(void *data) * at some point in time or wait to the end of the world :) */ if (apps_cmd_pipe[1] >= 0) { - ret = write(apps_cmd_pipe[1], ust_cmd, - sizeof(struct ust_command)); + do { + ret = write(apps_cmd_pipe[1], ust_cmd, + sizeof(struct ust_command)); + } while (ret < 0 && errno == EINTR); if (ret < 0) { PERROR("write apps cmd pipe"); if (errno == EBADF) {