projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd6a1b8
)
Fixed pidfile handling
author
Art Cancro
<ajc@citadel.org>
Thu, 28 Dec 2006 18:29:45 +0000
(18:29 +0000)
committer
Art Cancro
<ajc@citadel.org>
Thu, 28 Dec 2006 18:29:45 +0000
(18:29 +0000)
citadel/sysdep.c
patch
|
blob
|
history
diff --git
a/citadel/sysdep.c
b/citadel/sysdep.c
index e3bfde3d7ac411ca41a6239fdb4fa668d0f164bb..f679ad5be1141ded89cc74216dda50695c0de676 100644
(file)
--- a/
citadel/sysdep.c
+++ b/
citadel/sysdep.c
@@
-777,11
+777,6
@@
void start_daemon(int unused) {
child = fork();
if (child != 0) {
- fp = fopen(file_pid_file, "w");
- if (fp != NULL) {
- fprintf(fp, "%d\n", child);
- fclose(fp);
- }
exit(0);
}
@@
-810,6
+805,11
@@
void start_daemon(int unused) {
}
else {
+ fp = fopen(file_pid_file, "w");
+ if (fp != NULL) {
+ fprintf(fp, "%d\n", child);
+ fclose(fp);
+ }
waitpid(current_child, &status, 0);
}