bwrite shouldn't clear B_AGE or brelse won't put it at the head
[unix-history] / usr / src / sys / kern / kern_sig.c
index fff0a5d..d9f91b4 100644 (file)
@@ -1,13 +1,15 @@
-/*     kern_sig.c      5.7     82/09/08        */
+/*     kern_sig.c      5.13    82/12/17        */
+
+#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/param.h"
 #include "../h/systm.h"
 #include "../h/dir.h"
 #include "../h/user.h"
-#include "../h/reg.h"
 #include "../h/inode.h"
 #include "../h/proc.h"
 #include "../h/inode.h"
 #include "../h/proc.h"
-#include "../h/mtpr.h"
 #include "../h/timeb.h"
 #include "../h/times.h"
 #include "../h/conf.h"
 #include "../h/timeb.h"
 #include "../h/times.h"
 #include "../h/conf.h"
 #include "../h/mount.h"
 #include "../h/text.h"
 #include "../h/seg.h"
 #include "../h/mount.h"
 #include "../h/text.h"
 #include "../h/seg.h"
-#include "../h/pte.h"
-#include "../h/psl.h"
 #include "../h/vm.h"
 #include "../h/acct.h"
 #include "../h/uio.h"
 #include "../h/kernel.h"
 #include "../h/vm.h"
 #include "../h/acct.h"
 #include "../h/uio.h"
 #include "../h/kernel.h"
+#include "../h/nami.h"
 
 /* KILL CODE SHOULDNT KNOW ABOUT PROCESS INTERNALS !?! */
 
 
 /* KILL CODE SHOULDNT KNOW ABOUT PROCESS INTERNALS !?! */
 
@@ -49,10 +50,12 @@ sigstack()
 
 }
 
 
 }
 
+#ifdef notdef
 kill()
 {
 
 }
 kill()
 {
 
 }
+#endif
 
 killpg()
 {
 
 killpg()
 {
@@ -409,6 +412,7 @@ psignal(p, sig)
                 * It will either never be noticed, or noticed very soon.
                 */
                if (p == u.u_procp && !noproc)
                 * It will either never be noticed, or noticed very soon.
                 */
                if (p == u.u_procp && !noproc)
+#include "../vax/mtpr.h"
                        aston();
                goto out;
        }
                        aston();
                goto out;
        }
@@ -691,7 +695,7 @@ core()
                return (0);
        u.u_error = 0;
        u.u_dirp = "core";
                return (0);
        u.u_error = 0;
        u.u_dirp = "core";
-       ip = namei(schar, 1, 1);
+       ip = namei(schar, CREATE, 1);
        if (ip == NULL) {
                if (u.u_error)
                        return (0);
        if (ip == NULL) {
                if (u.u_error)
                        return (0);
@@ -705,19 +709,23 @@ core()
                u.u_error = EFAULT;
                goto out;
        }
                u.u_error = EFAULT;
                goto out;
        }
-       itrunc(ip, 0);
+       itrunc(ip, (u_long)0);
        u.u_acflag |= ACORE;
        u.u_acflag |= ACORE;
-       u.u_error =rdwri(UIO_WRITE, ip,
-           (caddr_t)&u, ctob(UPAGES),
-           0, 1, (int *)0);
+       /* if (u.u_error == 0) */
+               u.u_error = rdwri(UIO_WRITE, ip,
+                   (caddr_t)&u,
+                   ctob(UPAGES),
+                   0, 1, (int *)0);
        if (u.u_error == 0)
        if (u.u_error == 0)
-       rdwri(UIO_WRITE, ip,
-           (caddr_t)ctob(u.u_tsize), ctob(u.u_dsize),
-           ctob(UPAGES), 0, (int *)0);
+               u.u_error = rdwri(UIO_WRITE, ip,
+                   (caddr_t)ctob(dptov(u.u_procp, 0)),
+                   ctob(u.u_dsize),
+                   ctob(UPAGES), 0, (int *)0);
        if (u.u_error == 0)
        if (u.u_error == 0)
-       rdwri(UIO_WRITE, ip,
-           (caddr_t)(USRSTACK-ctob(u.u_ssize)), ctob(u.u_ssize),
-           ctob(UPAGES)+ctob(u.u_dsize), 0, (int *)0);
+               u.u_error = rdwri(UIO_WRITE, ip,
+                   (caddr_t)ctob(sptov(u.u_procp, u.u_ssize - 1)),
+                   ctob(u.u_ssize),
+                   ctob(UPAGES)+ctob(u.u_dsize), 0, (int *)0);
 out:
        iput(ip);
        return (u.u_error == 0);
 out:
        iput(ip);
        return (u.u_error == 0);