K 10 svn:author V 3 ian K 8 svn:date V 27 2013-03-04T17:39:17.636372Z K 7 svn:log V 885 MFC r246121 r246361 ... 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 command line arg. When the maximum number of connections is reached it stops accepting new connections until some current clients drop off. Bump .Dd in for content change (r246361). END