summaryrefslogtreecommitdiff
path: root/usr.sbin/pstat
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-08-28 04:38:48 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-08-28 04:38:48 +0000
commit5d513420a7fc3c0221798248e7cd1907078c3630 (patch)
tree7aa6da389df2f4182073f9ed0e295a4415b3b557 /usr.sbin/pstat
parented25cc9e5c43502e76502b6c4b906ef4ef5ef0a0 (diff)
Rework the UNIX domain socket garbage collector, including ideas from
{Free,Net}BSD - when a socket is closed with fds in its input, defer closing them to a task to avoid recursing. This eliminates the complicated extra reference taking which had a 37 line(!) comment explanation - move flags, counts, and links only needed for this from struct file to struct unpcb - document the flow of the mark/sweep collector much help from claudio@ who made me explain the GC to him until we trusted it ok claudio@ mpi@ deraadt@
Diffstat (limited to 'usr.sbin/pstat')
-rw-r--r--usr.sbin/pstat/pstat.88
-rw-r--r--usr.sbin/pstat/pstat.c6
2 files changed, 3 insertions, 11 deletions
diff --git a/usr.sbin/pstat/pstat.8 b/usr.sbin/pstat/pstat.8
index 3d3240f29d6..72ee43c86ff 100644
--- a/usr.sbin/pstat/pstat.8
+++ b/usr.sbin/pstat/pstat.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pstat.8,v 1.48 2014/10/01 09:56:36 mpi Exp $
+.\" $OpenBSD: pstat.8,v 1.49 2015/08/28 04:38:47 guenther Exp $
.\" $NetBSD: pstat.8,v 1.9.4.1 1996/06/02 09:08:17 mrg Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993, 1994
@@ -30,7 +30,7 @@
.\"
.\" from: @(#)pstat.8 8.4 (Berkeley) 4/19/94
.\"
-.Dd $Mdocdate: October 1 2014 $
+.Dd $Mdocdate: August 28 2015 $
.Dt PSTAT 8
.Os
.Sh NAME
@@ -94,12 +94,8 @@ open for appending
exclusive or shared lock present
.It I
signal pgrp when data ready
-.It d
-deferred for next AF_UNIX garbage collection pass
.It l
file descriptor slot is larval
-.It m
-marked during AF_UNIX garbage collection pass
.El
.It CNT
Number of processes that know this open file.
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index e7cc5a90b92..172d39cd7c5 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pstat.c,v 1.99 2015/03/11 14:59:04 deraadt Exp $ */
+/* $OpenBSD: pstat.c,v 1.100 2015/08/28 04:38:47 guenther Exp $ */
/* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */
/*-
@@ -1038,10 +1038,6 @@ filemode(void)
*fbp++ = 'L';
if (kf->f_iflags & FIF_LARVAL)
*fbp++ = 'l';
- if (kf->f_iflags & FIF_MARK)
- *fbp++ = 'm';
- if (kf->f_iflags & FIF_DEFER)
- *fbp++ = 'd';
*fbp = '\0';
(void)printf("%6s %3ld", flagbuf, (long)kf->f_count);