chiark / gitweb /
slip: Report unexpected kinds of death from userv
[secnet.git] / udp.c
diff --git a/udp.c b/udp.c
index 8f0bb8bde3fdeb33b46c2f7bb2b3cd46d6c4505e..a6ab49a04000f93c44df1ac9a31ef2f3c4a36374 100644 (file)
--- a/udp.c
+++ b/udp.c
@@ -258,15 +258,8 @@ bool_t udp_make_socket(struct udpcommon *uc, struct udpsock *us,
            if (errno==EINTR) continue;
            FAIL("waitpid for authbind");
        }
-       if (WIFSIGNALED(status)) {
-           lg_perror(FAIL_LG,0,"authbind died on signal %s (%d)",
-                       strsignal(WTERMSIG(status)),WTERMSIG(status));
-           goto failed;
-       }
-       if (WIFEXITED(status) && WEXITSTATUS(status)!=0) {
-           lg_perror(FAIL_LG,0,
-                     "authbind died with error exit status %d",
-                     WEXITSTATUS(status));
+       if (status) {
+           lg_exitstatus(FAIL_LG,status,"authbind");
            goto failed;
        }
     } else {
@@ -288,7 +281,14 @@ failed:
 void udp_socks_register(struct udpcommon *uc, struct udpsocks *socks)
 {
     socks->uc=uc;
-    register_for_poll(socks,udp_socks_beforepoll,udp_socks_afterpoll,"udp");
+    socks->interest=
+       register_for_poll(socks,udp_socks_beforepoll,udp_socks_afterpoll,"udp");
+}
+
+void udp_socks_deregister(struct udpcommon *uc, struct udpsocks *socks)
+{
+    socks->uc=uc;
+    deregister_for_poll(socks->interest);
 }
 
 static void udp_phase_hook(void *sst, uint32_t new_phase)