Update skynet_daemon.c
@@ -37,7 +37,7 @@ write_pid(const char *pidfile) {
fprintf(stderr, "Can't create pidfile [%s].\n", pidfile);
return 0;
}
- f = fdopen(fd, "r+");
+ f = fdopen(fd, "w+");
if (f == NULL) {
fprintf(stderr, "Can't open pidfile [%s].\n", pidfile);
return 0;
