[PATCH] create ipc socket before calling daemon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux