Loading...
sys/sigaction.c Libc-391 Libc-498
--- Libc/Libc-391/sys/sigaction.c
+++ Libc/Libc-498/sys/sigaction.c
@@ -26,7 +26,6 @@
  *	@(#)sigaction.c	1.0
  */
 
-#include <sys/syscall.h>
 #include <unistd.h>
 #include <signal.h>
 #include <sys/signal.h>
@@ -37,6 +36,7 @@
  *	as the signal handler instead.  The code here is derived
  *	from sigvec in sys/kern_sig.c.
  */
+extern int __sigaction (int, struct __sigaction * __restrict, struct sigaction * __restrict);
 
 int
 sigaction (int sig, const struct sigaction * __restrict nsv, struct sigaction * __restrict osv)
@@ -57,10 +57,7 @@
 		sa.sa_flags = nsv->sa_flags;	
 		sap = &sa;
 	}
-	if (syscall (SYS_sigaction, sig, sap, osv) < 0) {
-	        return (-1);
-	}
-	return (0);
+	return __sigaction(sig, sap, osv);
 }
 
 // XXX