diff options
| author | Junio C Hamano <junkio@cox.net> | 2007-05-21 20:03:53 -0700 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2007-05-21 20:03:53 -0700 |
| commit | fbf5df024e9137d446c5a85adeae7e4780365d1b (patch) | |
| tree | 69e649ccbf7f457673d2f401956f54b20a7b5f2f /daemon.c | |
| parent | 93d496a560cdcd4f72c8dee1b0b2efa324e1c3bb (diff) | |
| parent | 523d12e5003eee0c2cb670b51e39d719cd56aacd (diff) | |
| download | git-fbf5df024e9137d446c5a85adeae7e4780365d1b.tar.xz | |
Merge branch 'maint'
* maint:
git-cvsserver: fix disabling service via per-method config
git-status: respect core.excludesFile
SubmittingPatches: mention older C compiler compatibility
git-daemon: don't ignore pid-file write failure
Diffstat (limited to 'daemon.c')
| -rw-r--r-- | daemon.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -970,8 +970,8 @@ static void store_pid(const char *path) FILE *f = fopen(path, "w"); if (!f) die("cannot open pid file %s: %s", path, strerror(errno)); - fprintf(f, "%d\n", getpid()); - fclose(f); + if (fprintf(f, "%d\n", getpid()) < 0 || fclose(f) != 0) + die("failed to write pid file %s: %s", path, strerror(errno)); } static int serve(char *listen_addr, int listen_port, struct passwd *pass, gid_t gid) |
