The resolv.conf watcher needs one watch on one directory and a
blocking read. gonotify v3.0.2 has a bug where it loops forever
without advancing when a record's name length runs past the end of a
read. It also never closes its fd on cancel and allocates 32 KB per
Read. Use x/sys/unix directly, return an error on a malformed record,
and stop when the kernel removes the watch.
Fixes#16576
Signed-off-by: Brad Fitzpatrick <[email protected]>
Change-Id: If2bc5e94f8aab2922ee9e07b3c2b75a76f4f9236