]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r246121 r246361 ...
authorian <ian@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 4 Mar 2013 17:39:17 +0000 (17:39 +0000)
committerian <ian@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 4 Mar 2013 17:39:17 +0000 (17:39 +0000)
commit9bd7aaab1923dc50275b49714e094aa39300784c
tree4363d14e06241628f5c5a7132023a340a0628468
parentbcbde46571468517a0d80ae62561d6f945330658
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 <num> 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).

git-svn-id: svn://svn.freebsd.org/base/stable/8@247806 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/devd/devd.8
sbin/devd/devd.cc