diff --git a/dispatcher/main.c b/dispatcher/main.c index 8088bd0..f2d299a 100644 --- a/dispatcher/main.c +++ b/dispatcher/main.c @@ -47,7 +47,8 @@ daemonize (void) setsid (); - if ((pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid", O_CREAT | O_WRONLY)) != -1) + pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid", O_CREAT | O_WRONLY, 0644); + if (-1 != pidfile_fd) { str = g_strdup_printf ("%d", getpid ()); write (pidfile_fd, str, strlen (str));