projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fb4b36
)
server: fix wrong use of exit() in server when daemonized
author
Jens Axboe
<axboe@fb.com>
Thu, 11 Sep 2014 23:05:58 +0000
(17:05 -0600)
committer
Jens Axboe
<axboe@fb.com>
Thu, 11 Sep 2014 23:05:58 +0000
(17:05 -0600)
We can't use exit(), or we'll trigger the atexit() hook and
free the shared mem used for mutexes, etc. This can cause a
hang when using a daemonized fio server.
Reported-by: Castor Fu <castor@egocast.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
server.c
patch
|
blob
|
blame
|
history
diff --git
a/server.c
b/server.c
index e2a6f73eb2ba4678d971b668f0d1cb3d5d14e35c..36713ee5716058fddf49f7213fe6d444b26b7c53 100644
(file)
--- a/
server.c
+++ b/
server.c
@@
-1709,7
+1709,7
@@
int fio_start_server(char *pidfile)
int ret = write_pid(pid, pidfile);
free(pidfile);
- exit(ret);
+
_
exit(ret);
}
setsid();