summaryrefslogtreecommitdiffstats
path: root/sbin/devd/devd.8
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2013-01-30 15:21:18 +0000
committerian <ian@FreeBSD.org>2013-01-30 15:21:18 +0000
commit3e5ced1b98dca63d150904313752d2ee1cf72802 (patch)
tree2ce15a473ba5efbc5ea34e56595a5f26d1936120 /sbin/devd/devd.8
parente7ca48d15b0d2114430b38f3d1cd793d3e50a3ae (diff)
downloadFreeBSD-src-3e5ced1b98dca63d150904313752d2ee1cf72802.zip
FreeBSD-src-3e5ced1b98dca63d150904313752d2ee1cf72802.tar.gz
Fix a descriptor leak in devd. Clients reading /var/run/devd.pipe can close
their socket connection any time, and devd only notices that when it gets an error trying to write an event to the client. On a system with no device change activity, clients could connect and disappear repeatedly without devd noticing, leading to an ever-growing list of open socket descriptors in devd. Now devd uses poll(2) looking for POLLHUP on all existing clients every time a new client connection is established, and also periodically (once a minute) to proactively find zombie clients and reap the socket descriptors. It also now has a connection limit, configurable with a new -l <num> command line arg. When the maximum number of connections is reached it stops accepting new connections until some current clients drop off. Reviewed by: imp Approved by: cognet (mentor)
Diffstat (limited to 'sbin/devd/devd.8')
-rw-r--r--sbin/devd/devd.87
1 files changed, 7 insertions, 0 deletions
diff --git a/sbin/devd/devd.8 b/sbin/devd/devd.8
index 7377e25..bc5092c 100644
--- a/sbin/devd/devd.8
+++ b/sbin/devd/devd.8
@@ -35,6 +35,7 @@
.Nm
.Op Fl Ddn
.Op Fl f Ar file
+.Op Fl l Ar num
.Sh DESCRIPTION
The
.Nm
@@ -55,6 +56,12 @@ instead of the default
If option
.Fl f
is specified more than once, the last file specified is used.
+.It Fl l Ar num
+Limit concurrent
+.Pa /var/run/devd.pipe
+connections to
+.Ar num .
+The default connection limit is 10.
.It Fl n
Do not process all pending events before becoming a daemon.
Instead, call daemon right away.
OpenPOWER on IntegriCloud