From: Pierre-Marc Fournier Date: Mon, 28 Sep 2009 23:49:02 +0000 (-0400) Subject: improve fork handling X-Git-Tag: v0.1~113 X-Git-Url: http://git.liburcu.org/?p=ust.git;a=commitdiff_plain;h=60e57148f47eb3a3116de47e23516fc5df8c968e improve fork handling --- diff --git a/libust/tracectl.c b/libust/tracectl.c index 51460d1..faa4714 100644 --- a/libust/tracectl.c +++ b/libust/tracectl.c @@ -1006,13 +1006,15 @@ static void __attribute__((constructor(1000))) init() return; } - inform_consumer_daemon(trace_name); - result = ltt_trace_start(trace_name); if(result < 0) { ERR("ltt_trace_start failed"); return; } + + /* Do this after the trace is started in order to avoid creating confusion + * if the trace fails to start. */ + inform_consumer_daemon(trace_name); } diff --git a/libustcomm/ustcomm.c b/libustcomm/ustcomm.c index 2e490b5..6044c27 100644 --- a/libustcomm/ustcomm.c +++ b/libustcomm/ustcomm.c @@ -89,7 +89,7 @@ static int send_message_fd(int fd, const char *msg) { int result; - result = send(fd, msg, strlen(msg), 0); + result = send(fd, msg, strlen(msg), MSG_NOSIGNAL); if(result == -1) { PERROR("send"); return -1;