Subject: [netatalk-admins] Re: afpd[nnn]: dsi_tcp_open: sigaction: Invalid argument

From: Makoto Fujiwara <[email-masked]>
Date: Fri, 14 May 1999 11:36:25 +0900

Thanks asun for a quick response.

I got my problem fixed. Is this NetBSD specific problem ?
The patch I have applied is as follows, is this what you meant ?

--- libatalk/dsi/dsi_tcp.c.orig	Wed Nov 18 16:59:25 1998
+++ libatalk/dsi/dsi_tcp.c	Fri May 14 11:30:07 1999
@@ -108,6 +108,7 @@
       exit(1);
     }
     newact.sa_handler = timeout_handler;
+    memset(&newact, 0, sizeof(newact));
     if (sigaction(SIGALRM, &newact, &oldact) < 0) {
 	syslog(LOG_ERR, "dsi_tcp_open: sigaction: %m");
 	exit(1);
@@ -161,6 +162,7 @@
     }
     
     /* restore signal */
+    memset(&oldact, 0, sizeof(oldact));
     sigaction(SIGALRM, &oldact, 0);
 
     syslog(LOG_INFO,"ASIP session:%u(%d) from %s:%u(%d)", 

---
(Makoto Fujiwara)

---

From: a sun <[email-masked]>
Date: Thu, 13 May 1999 19:50:22 -0700 (PDT)

/* restore signal */

please don't use the above. it's very wrong. get rid of the second
memset and stick the first one above the newact.sa_handler bit.

-a