Ian Lepore e1334f935f 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)
2013-01-30 15:21:18 +00:00
..
2012-11-29 05:16:50 +00:00
2011-11-06 20:39:35 +00:00
2011-11-09 21:01:50 +00:00
2012-09-27 23:31:06 +00:00
2013-01-09 18:18:08 +00:00
2012-05-12 15:08:22 +00:00
2012-08-01 00:36:12 +00:00
2012-01-28 13:41:34 +00:00
2012-05-17 11:50:12 +00:00
2012-09-29 16:42:01 +00:00
2013-01-01 18:28:21 +00:00
2012-02-07 14:06:30 +00:00
2012-01-13 06:56:59 +00:00
2012-08-01 09:10:21 +00:00
2012-11-15 15:06:21 +00:00