projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d095b18
)
Actually go daemon
author
Wouter Verhelst <w@uter.be>
Tue, 26 May 2009 15:45:19 +0000
(17:45 +0200)
committer
Wouter Verhelst <w@uter.be>
Tue, 26 May 2009 15:45:19 +0000
(17:45 +0200)
just doing chdir("/") leave file descriptors open, which is not ideal.
Doing it this way closes everything, including any system-specific
things we're not aware of.
nbd-client.c
patch
|
blob
|
history
diff --git
a/nbd-client.c
b/nbd-client.c
index
13f0dde
..
913af90
100644
(file)
--- a/
nbd-client.c
+++ b/
nbd-client.c
@@
-316,7
+316,7
@@
int main(int argc, char *argv[]) {
/* Go daemon */
- chdir("/");
+ daemon(0,0);
do {
#ifndef NOFORK
if (!nofork) {