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
--y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 24, 2001 at 07:29:53AM +0100, Ben Smithurst wrote: > Kris Kennaway wrote: >=20 > > + n =3D poll(pfd, 1, 1000); >=20 > 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 =3D POLLIN line should be > pfd[0].revents =3D pfd[0].events =3D 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 --y0ulUmNC+osPPQO6 Content-Type: application/pgp-signature Content-Disposition: inline -----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----- --y0ulUmNC+osPPQO6-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010723234000.A2691>