X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ustd%2Fustd.c;h=26f87a2ba3f991f0e7a5acba10aa8a6d3b539b17;hb=b5b073e22d34bec71259d39b8946354f170f01a9;hp=bfa6352e1ccf2b4063660ff279b007f29ec3702a;hpb=aa08b4413291fabcbd1b1144377d37034ad361de;p=ust.git diff --git a/ustd/ustd.c b/ustd/ustd.c index bfa6352..26f87a2 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"); @@ -698,7 +698,6 @@ int start_ustd_daemon() } else { char buf; - FILE *pidfp; result = read(fd[0], &buf, 1); if(result == -1) {