-/* kern_sig.c 5.21 83/06/10 */
-
-#include "../machine/reg.h"
-#include "../machine/pte.h"
-#include "../machine/psl.h"
-
-#include "../h/param.h"
-#include "../h/systm.h"
-#include "../h/dir.h"
-#include "../h/user.h"
-#include "../h/inode.h"
-#include "../h/proc.h"
-#include "../h/timeb.h"
-#include "../h/times.h"
-#include "../h/conf.h"
-#include "../h/buf.h"
-#include "../h/mount.h"
-#include "../h/text.h"
-#include "../h/seg.h"
-#include "../h/vm.h"
-#include "../h/acct.h"
-#include "../h/uio.h"
-#include "../h/kernel.h"
-#include "../h/nami.h"
-
-#define mask(s) (1 << ((s)-1))
-#define cantmask (mask(SIGKILL)|mask(SIGCONT)|mask(SIGSTOP))
-
-sigvec()
-{
- register struct a {
+/*
+ * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution is only permitted until one year after the first shipment
+ * of 4.4BSD by the Regents. Otherwise, redistribution and use in source and
+ * binary forms are permitted provided that: (1) source distributions retain
+ * this entire copyright notice and comment, and (2) distributions including
+ * binaries display the following acknowledgement: This product includes
+ * software developed by the University of California, Berkeley and its
+ * contributors'' in the documentation or other materials provided with the
+ * distribution and in all advertising materials mentioning features or use
+ * of this software. Neither the name of the University nor the names of
+ * its contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @(#)kern_sig.c 7.23 (Berkeley) 6/28/90
+ */
+
+#include "param.h"
+#include "systm.h"
+#include "user.h"
+#include "vnode.h"
+#include "proc.h"
+#include "timeb.h"
+#include "times.h"
+#include "buf.h"
+#include "text.h"
+#include "seg.h"
+#include "vm.h"
+#include "acct.h"
+#include "uio.h"
+#include "file.h"
+#include "kernel.h"
+#include "wait.h"
+#include "ktrace.h"
+
+#include "machine/reg.h"
+#include "machine/pte.h"
+#include "machine/psl.h"
+#include "machine/mtpr.h"
+
+#define ttystopsigmask (sigmask(SIGTSTP)|sigmask(SIGTTIN)|sigmask(SIGTTOU))
+#define stopsigmask (sigmask(SIGSTOP)|ttystopsigmask)
+#define defaultignmask (sigmask(SIGCONT)|sigmask(SIGIO)|sigmask(SIGURG)| \
+ sigmask(SIGCHLD)|sigmask(SIGWINCH)|sigmask(SIGINFO))
+
+/*
+ * Can process p send the signal signo to process q?
+ */
+#define CANSIGNAL(p, q, signo) \
+ ((p)->p_uid == 0 || \
+ (p)->p_ruid == (q)->p_ruid || (p)->p_uid == (q)->p_ruid || \
+ (p)->p_ruid == (q)->p_uid || (p)->p_uid == (q)->p_uid || \
+ ((signo) == SIGCONT && (q)->p_session == (p)->p_session))
+
+/* ARGSUSED */
+sigaction(p, uap, retval)
+ struct proc *p;
+ register struct args {