ustd: fix opening mode of pidfile to support writing to fifos
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Wed, 28 Oct 2009 04:12:09 +0000 (00:12 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Wed, 28 Oct 2009 04:12:09 +0000 (00:12 -0400)
The fifo is opened in write-only in order to block until someone
opens it.

ustd/ustd.c

index bfa6352e1ccf2b4063660ff279b007f29ec3702a..5a4569519b78138d3ed7c29fc985a58b7b8c1b33 100644 (file)
@@ -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");
This page took 0.036083 seconds and 4 git commands to generate.