Date: Mon, 23 Jul 2001 23:40:01 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Ben Smithurst <ben@FreeBSD.org> Cc: Kris Kennaway <kris@obsecurity.org>, audit@FreeBSD.org Subject: Re: rwhod signal fixes Message-ID: <20010723234000.A2691@xor.obsecurity.org> In-Reply-To: <20010724072952.A14233@strontium.shef.vinosystems.com>; from ben@FreeBSD.org on Tue, Jul 24, 2001 at 07:29:53AM %2B0100 References: <20010723223904.A1381@xor.obsecurity.org> <20010724072952.A14233@strontium.shef.vinosystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Tue, Jul 24, 2001 at 07:29:53AM +0100, Ben Smithurst wrote: > Kris Kennaway wrote: > > > + n = poll(pfd, 1, 1000); > > Is it really necessary to have rwhod go round in a loop like this > wasting CPU time? What was wrong with using alarm() ? It was already using alarm() to wake up every second, but it was doing unsafe work in the signal handler. > Ah, I see the problem, that pfd[0].revents = POLLIN line should be > pfd[0].revents = pfd[0].events = POLLIN, I think. After making that > change it works, but I still don't see why it has to sit in a loop > waking up every second to do bugger all. Noted, thanks. Kris [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7XRg/Wry0BWjoQKURAoreAKCTyMiS3yd16/2R4J0qko46EJ7dCQCeKEO2 ospdm/VDWaQQlJnR7Q8T66U= =LJZX -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010723234000.A2691>
