[libmultipath] remove exit() 1 : uevent.c
authorChristophe Varoqui <root@xa-s05.(none)>
Thu, 27 Oct 2005 07:56:58 +0000 (09:56 +0200)
committerChristophe Varoqui <root@xa-s05.(none)>
Thu, 27 Oct 2005 07:56:58 +0000 (09:56 +0200)
libmultipath/uevent.c
multipathd/main.c

index d1ae45c..9113f14 100644 (file)
@@ -58,7 +58,7 @@ int uevent_listen(int (*uev_trigger)(struct uevent *, void * trigger_data),
        sock = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT);
        if (sock == -1) {
                condlog(0, "error getting socket, exit\n");
-               exit(1);
+               return 1;
        }
 
        retval = bind(sock, (struct sockaddr *) &snl,
index ddf18cd..c737d84 100644 (file)
@@ -1045,8 +1045,10 @@ out:
 static void *
 ueventloop (void * ap)
 {
-       uevent_listen(&uev_trigger, ap);
-
+       if (uevent_listen(&uev_trigger, ap)) {
+               fprintf(stderr, "error starting uevent listener");
+               exit;
+       }
        return NULL;
 }