From: Pierre-Marc Fournier Date: Wed, 28 Oct 2009 04:12:09 +0000 (-0400) Subject: ustd: fix opening mode of pidfile to support writing to fifos X-Git-Tag: v1.9.1~841 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=5d72e651d038661be29b162373be97611bb4e61c;p=lttng-ust.git ustd: fix opening mode of pidfile to support writing to fifos The fifo is opened in write-only in order to block until someone opens it. --- diff --git a/ustd/ustd.c b/ustd/ustd.c index bfa6352e..5a456951 100644 --- a/ustd/ustd.c +++ b/ustd/ustd.c @@ -545,7 +545,7 @@ static int write_pidfile(const char *file_name, pid_t pid) { FILE *pidfp; - pidfp = fopen(file_name, "w+"); + pidfp = fopen(file_name, "w"); if(!pidfp) { PERROR("fopen (%s)", pidfile); WARN("killing child process");