Date: Tue, 17 Sep 1996 18:56:52 -0400 (EDT)
From: Kenneth Stailey <kstailey@dol-esa.gov>
To: Mills@huey.udel.edu
Subject: Re: fix for xntp3.4y for DYNIX/ptx 2.1
Message-Id: <199609172256.SAA00232@owl.dol-esa.gov>
Content-Length: 1340
X-Digest: [Kenneth Stailey:  Re: fix for xntp3.4y for DYNIX/ptx 2.1]
In-reply-to: <9601292332.aa21933@huey.udel.edu> (Mills@huey.udel.edu)

> I have a bunch of DYNIX patches in the xntp3.4z version, on which
> the paint is almost dry. The problem may already be fixed. Please
> quack if the z version croaks on your machine and send me a diff -c
> patch. Things have been pretty hectic while I was on sabatical.

Sorry it took so long to get back to you.  I have just built xntpd 3.5f
on DYNIX/ptx 4.1.3 with the SysVR4 configuration.  I just needed one
patch to get ntpdate to work (included below.)  This patch was also
needed for DYNIX/ptx 2.1.1 running xntp3.4y.

Please note:

DYNIX v.3 == 4.3BSD + optional SysVR2 emulation environment + SMP

DYNIX/ptx 2.1.x == SysVR3 + some BSD extenstions + SMP

DYNIX/ptx 4.1.x == SysVR4 + SMP

--- ntpdate.c.DIST	Tue Sep 17 18:43:36 1996
+++ ntpdate.c	Tue Sep 17 18:45:38 1996
@@ -1780,3 +1780,29 @@
 	return (len);
 }
 #endif
+
+/* override function in library since SA_RESTART makes ALL syscalls restart */
+#ifdef _SEQUENT_
+void
+signal_no_reset(sig, func)
+int sig;
+void (*func)();
+{
+    int n;
+    struct sigaction vec;
+
+    vec.sa_handler = func;
+    sigemptyset(&vec.sa_mask);
+    vec.sa_flags = 0;
+
+    while (1) {
+        n = sigaction(sig, &vec, NULL);
+        if (n == -1 && errno == EINTR) continue;
+        break;
+    }
+    if (n == -1) {
+        perror("sigaction");
+        exit(1);
+    }
+}
+#endif


