Skip to contentSkip to conversation

Behaviour when specifying '-g 0 -B'

PATCH Philipp Thomas 1 participant 1 message Jul 9, 2012 InfiniBand

lore
Share & tools
lore
#0 lore raw

Currently opensm will silently fail if you pass '-g0 -B'. As you can't ask for a port, how about exiting with failure in daemonize. That way the user would see the reason for opensm's failure.

main.c renamed from main.c.orig +5 -0
Index: main.c
===================================================================
@@ -464,6 +464,11 @@ static int daemonize(osm_opensm_t * osm)
 	pid_t pid;
 	int fd;
 
+    if ( INVALID_GUID == opt.gui ) {
+        fputs(stderr, "opensm: Invalid GUID specified: exiting because of daemon mode");
+        return -1;
+    }
+
 	fd = open("/dev/null", O_WRONLY);
 	if (fd < 0) {
 		perror("open");

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html