-.\" $OpenBSD: acct.5,v 1.15 2015/09/10 17:55:21 schwarze Exp $
+.\" $OpenBSD: acct.5,v 1.16 2017/06/08 17:14:02 bluhm Exp $
.\" $NetBSD: acct.5,v 1.4 1995/10/22 01:40:10 ghudson Exp $
.\"
.\" Copyright (c) 1991, 1993
.\"
.\" @(#)acct.5 8.1 (Berkeley) 6/5/93
.\"
-.Dd $Mdocdate: September 10 2015 $
+.Dd $Mdocdate: June 8 2017 $
.Dt ACCT 5
.Os
.Sh NAME
#define ACOMPAT 0x04 /* used compatibility mode */
#define ACORE 0x08 /* dumped core */
#define AXSIG 0x10 /* killed by a signal */
+#define APLEDGE 0x20 /* killed due to pledge violation */
+#define ATRAP 0x40 /* memory access violation */
u_int8_t ac_flag; /* accounting flags */
};
-/* $OpenBSD: kern_sig.c,v 1.211 2017/04/20 12:59:36 visa Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.212 2017/06/08 17:14:02 bluhm Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
struct sigacts *ps = pr->ps_sigacts;
int mask;
+ switch (signum) {
+ case SIGILL:
+ case SIGBUS:
+ case SIGSEGV:
+ pr->ps_acflag |= ATRAP;
+ break;
+ }
+
mask = sigmask(signum);
if ((pr->ps_flags & PS_TRACED) == 0 &&
(ps->ps_sigcatch & mask) != 0 &&
-/* $OpenBSD: acct.h,v 1.6 2017/06/07 20:53:59 bluhm Exp $ */
+/* $OpenBSD: acct.h,v 1.7 2017/06/08 17:14:02 bluhm Exp $ */
/* $NetBSD: acct.h,v 1.16 1995/03/26 20:23:52 jtc Exp $ */
/*-
#define ACORE 0x08 /* dumped core */
#define AXSIG 0x10 /* killed by a signal */
#define APLEDGE 0x20 /* killed due to pledge violation */
+#define ATRAP 0x40 /* memory access violation */
u_int8_t ac_flag; /* accounting flags */
};
-.\" $OpenBSD: lastcomm.1,v 1.17 2017/06/07 20:53:59 bluhm Exp $
+.\" $OpenBSD: lastcomm.1,v 1.18 2017/06/08 17:14:02 bluhm Exp $
.\" $NetBSD: lastcomm.1,v 1.5 1995/10/22 01:43:41 ghudson Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\"
.\" @(#)lastcomm.1 8.1 (Berkeley) 6/6/93
.\"
-.Dd $Mdocdate: June 7 2017 $
+.Dd $Mdocdate: June 8 2017 $
.Dt LASTCOMM 1
.Os
.Sh NAME
.Pa core
file,
.Sq X
-indicates the command was terminated with a signal, and
+indicates the command was terminated with a signal,
.Sq P
indicates the command was terminated due to a
.Xr pledge 2
-violation.
+violation, and
+.Sq T
+indicates the command did a memory access violation detected by a
+processor trap.
.Sh FILES
.Bl -tag -width /var/account/acct -compact
.It Pa /var/account/acct
-/* $OpenBSD: lastcomm.c,v 1.25 2017/06/07 20:53:59 bluhm Exp $ */
+/* $OpenBSD: lastcomm.c,v 1.26 2017/06/08 17:14:02 bluhm Exp $ */
/* $NetBSD: lastcomm.c,v 1.9 1995/10/22 01:43:42 ghudson Exp $ */
/*
BIT(ACORE, 'D');
BIT(AXSIG, 'X');
BIT(APLEDGE, 'P');
+ BIT(ATRAP, 'T');
*p = '\0';
return (flags);
}