Skip to content

Commit

Permalink
o don't trip if PID file cannot be written.
Browse files Browse the repository at this point in the history
  • Loading branch information
hzeller committed Oct 26, 2012
1 parent cbf02d7 commit 3b4edf6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions folve-main.cc
Expand Up @@ -234,8 +234,10 @@ static int folve_fgetattr(const char *path, struct stat *result,
static void *folve_init(struct fuse_conn_info *conn) {
if (folve_rt.pid_file) {
FILE *p = fopen(folve_rt.pid_file, "w+");
fprintf(p, "%d\n", getpid());
fclose(p);
if (p) {
fprintf(p, "%d\n", getpid());
fclose(p);
}
}
const int ident_len = 20;
char *ident = (char*) malloc(ident_len); // openlog() keeps reference. Leaks.
Expand Down

0 comments on commit 3b4edf6

Please sign in to comment.