diff options
author | Junio C Hamano <junkio@cox.net> | 2007-05-22 01:42:35 (GMT) |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-22 01:42:35 (GMT) |
commit | f95c6780c244e90abf87222126ad3b4bb18a504e (patch) | |
tree | ede18dbb8b33e330f3837209a489f7737df2dc25 /daemon.c | |
parent | 7df6ddf51ea71d81874ecfa34f670f50a3d45103 (diff) | |
parent | 0ba956d331e4c14fb1600a62044492c6c27af71a (diff) | |
download | git-f95c6780c244e90abf87222126ad3b4bb18a504e.zip git-f95c6780c244e90abf87222126ad3b4bb18a504e.tar.gz git-f95c6780c244e90abf87222126ad3b4bb18a504e.tar.bz2 |
Merge branch 'maint-1.5.1' into maint
* maint-1.5.1:
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) |