Skip to contentSkip to conversation

uxlsnr patch

PATCH Applied Benjamin Marzinski 2 participants 2 messages Jul 21, 2005 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

Two little issues. Multipathd was shutting down whenever I tried to start up gdb monitoring on it, because uxlsnr code didn't like getting a signal. Also, having a lot of overlapping calls to the uxlsnr code caused really bad things to happen because of a linked list oversight.

This patch corrects both.

-Ben

multipathd/uxlsnr.c +3 -0
diff -urpN mp-devel/multipathd/uxlsnr.c mp-devel-patched/multipathd/uxlsnr.c
@@ -51,6 +51,7 @@ static void new_client(int ux_sock)
 	memset(c, 0, sizeof(*c));
 	c->fd = fd;
 	c->next = clients;
+	if (c->next) c->next->prev = c;
 	clients = c;
 	num_clients++;
 }
@@ -112,6 +113,8 @@ void * uxsock_listen(char * (*uxsock_tri
 		poll_count = poll(polls, i, SLEEP_TIME);
 		
 		if (poll_count == -1) {
+			if (errno == EINTR)
+				continue;
 			/* something went badly wrong! */
 			condlog(0, "poll");
 			exit(1);
#1 lore raw
Quoted 7 lines · Benjamin Marzinski

Two little issues. Multipathd was shutting down whenever I tried to start up gdb monitoring on it, because uxlsnr code didn't like getting a signal. Also, having a lot of overlapping calls to the uxlsnr code caused really bad things to happen because of a linked list oversight.

This patch corrects both.

Merged, thanks.

Signature · 1 line
christophe varoqui <[email protected]>