uprintf when user procs killed
authorBill Joy <wnj@ucbvax.Berkeley.EDU>
Sat, 7 Mar 1981 02:30:01 +0000 (18:30 -0800)
committerBill Joy <wnj@ucbvax.Berkeley.EDU>
Sat, 7 Mar 1981 02:30:01 +0000 (18:30 -0800)
SCCS-vsn: sys/kern/kern_physio.c 4.15
SCCS-vsn: sys/kern/vfs_bio.c 4.15
SCCS-vsn: sys/kern/vfs_cluster.c 4.15

usr/src/sys/kern/kern_physio.c
usr/src/sys/kern/vfs_bio.c
usr/src/sys/kern/vfs_cluster.c

index c88dac9..a01def7 100644 (file)
@@ -1,4 +1,4 @@
-/*     kern_physio.c   4.14    %G%     */
+/*     kern_physio.c   4.15    %G%     */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -634,12 +634,14 @@ swkill(p, rout)
        struct proc *p;
        char *rout;
 {
        struct proc *p;
        char *rout;
 {
+       char *mesg;
 
 
-       printf("%d: ", p->p_pid);
+       printf("pid %d: ", p->p_pid);
        if (rout)
        if (rout)
-               printf("out of swap space in %s\n", rout);
+               printf(mesg = "killed due to no swap space\n");
        else
        else
-               printf("killed on swap error\n");
+               printf(mesg = "killed on swap error\n");
+       uprintf("sorry, pid %d was %s", p->p_pid, mesg);
        /*
         * To be sure no looping (e.g. in vmsched trying to
         * swap out) mark process locked in core (as though
        /*
         * To be sure no looping (e.g. in vmsched trying to
         * swap out) mark process locked in core (as though
index 392907e..599b840 100644 (file)
@@ -1,4 +1,4 @@
-/*     vfs_bio.c       4.14    %G%     */
+/*     vfs_bio.c       4.15    %G%     */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -634,12 +634,14 @@ swkill(p, rout)
        struct proc *p;
        char *rout;
 {
        struct proc *p;
        char *rout;
 {
+       char *mesg;
 
 
-       printf("%d: ", p->p_pid);
+       printf("pid %d: ", p->p_pid);
        if (rout)
        if (rout)
-               printf("out of swap space in %s\n", rout);
+               printf(mesg = "killed due to no swap space\n");
        else
        else
-               printf("killed on swap error\n");
+               printf(mesg = "killed on swap error\n");
+       uprintf("sorry, pid %d was %s", p->p_pid, mesg);
        /*
         * To be sure no looping (e.g. in vmsched trying to
         * swap out) mark process locked in core (as though
        /*
         * To be sure no looping (e.g. in vmsched trying to
         * swap out) mark process locked in core (as though
index 37ad963..1fe9775 100644 (file)
@@ -1,4 +1,4 @@
-/*     vfs_cluster.c   4.14    %G%     */
+/*     vfs_cluster.c   4.15    %G%     */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -634,12 +634,14 @@ swkill(p, rout)
        struct proc *p;
        char *rout;
 {
        struct proc *p;
        char *rout;
 {
+       char *mesg;
 
 
-       printf("%d: ", p->p_pid);
+       printf("pid %d: ", p->p_pid);
        if (rout)
        if (rout)
-               printf("out of swap space in %s\n", rout);
+               printf(mesg = "killed due to no swap space\n");
        else
        else
-               printf("killed on swap error\n");
+               printf(mesg = "killed on swap error\n");
+       uprintf("sorry, pid %d was %s", p->p_pid, mesg);
        /*
         * To be sure no looping (e.g. in vmsched trying to
         * swap out) mark process locked in core (as though
        /*
         * To be sure no looping (e.g. in vmsched trying to
         * swap out) mark process locked in core (as though