[stgt] [PATCH] create ipc socket before calling daemon
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Wed Oct 22 03:40:15 CEST 2008
In some cases, this can prevent users from getting the 'connection
refused' errors when using tgtadm right after starting tgtd daemon.
Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
---
usr/tgtd.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/usr/tgtd.c b/usr/tgtd.c
index 62aaa04..7024b12 100644
--- a/usr/tgtd.c
+++ b/usr/tgtd.c
@@ -325,6 +325,10 @@ int main(int argc, char **argv)
exit(1);
}
+ err = ipc_init();
+ if (err)
+ exit(1);
+
if (is_daemon && daemon(0,0))
exit(1);
@@ -344,10 +348,6 @@ int main(int argc, char **argv)
}
}
- err = ipc_init();
- if (err)
- exit(1);
-
event_loop();
lld_exit();
--
1.5.5.GIT
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list