Re: hotplug notification

看板DFBSD_submit作者時間16年前 (2009/11/27 20:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFAAB08A1C687B4DD522320D9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Alexander Polakov wrote: > I think it could be nice to receive notification for creation and > removal of device nodes in userland. So I ported hotplug(4) and > hotplugd(8) from OpenBSD. I like the design, it's clean and simple: > an event contains type (attach or detach), device class (disk, tty or > generic) and name (as in /dev). Events are queued and can be read > from /dev/hotplug one-by-one (hotplugd(8) does that and can be > configured to execute commands on event arrival). >=20 > You can get code to review here: > http://gitweb.dragonflybsd.org/~polachok/dragonfly.git/hotplug2 I've always thought kqueue would be the ideal place to put events like this, also allowing multiple programs to listen for device events. Just a pointer though, I have no code to show :). Cheers, --=20 Thomas E. Spanjaard tgen@netphreax.net tgen@deepbone.net --------------enigFAAB08A1C687B4DD522320D9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (NetBSD) iQEcBAEBAgAGBQJLD8JKAAoJEKE55rmjwpbTrQ8H/0nN8Hwg9g67jDrWLN2J3Kvn J1rw8kI2hHPgYU84Xnuc/Y0a5PZWtp2FwIca/8gtMg8A1lWEQDyNCPYQ3jgyHBa0 NdwoJf7mF6yHXjUJx6eIIcRtFZSUPW5xSFxB50V4BJZ803iBXUq2eGd0t+oRUO5/ MMAFXb7Cze9b2w/VXr241B0NChdhaBhhSrZ1Hf7eKs7QYD+EdUSG+qr50jRtYTRJ R/k1mFvQAYy1a5Az6ejEtP1oH4WtjpKLweLWp8q3ktXEK6mkTy+vrfa5IRCP1KMo pXsXjpw9IY74avi2qAEqy+xeXSKnYs1jrIiceg/kjiaFUZju52xbegigNBjK0ck= =iDi6 -----END PGP SIGNATURE----- --------------enigFAAB08A1C687B4DD522320D9--
文章代碼(AID): #1B3yRAKX (DFBSD_submit)
文章代碼(AID): #1B3yRAKX (DFBSD_submit)