Re: [Nagios-devel] Possible bug in Nagios 2.12?
Posted: Fri Apr 17, 2009 3:27 pm
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andreas Ericsson wrote:
>> I'm going to sprinkle some yields where the sleeps are at and see if that helps, I'll keep you apprised.
>>
>
> That's a very good idea (replacing sleep(1) with sched_yield()). Just
> make sure it keeps on working on AIX and Solaris and stuff like that,
> where Nagios compiles and runs just fine today.
>
> I'd prefer if you did it with a helper function to make it easier to
> support various operating systems that need it without duplicating a
> lot of code.
Hey, sorry to jump in. I just read the thread; why don't you use
semaphores fix this issue? Just increase it when a check starts,
decrease when a check stops, and do a blocking wait for 0 instead of
doing an arbitrary sleep.
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJ6Ke86dZ+Kt5BchYRAiWfAKC8MhnAt2GIhbZWT2atl98yVJchQwCeMGMq
AaE8XsKEq8KyHWyvu/tl+aY=
=+hzu
-----END PGP SIGNATURE-----
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Hash: SHA1
Andreas Ericsson wrote:
>> I'm going to sprinkle some yields where the sleeps are at and see if that helps, I'll keep you apprised.
>>
>
> That's a very good idea (replacing sleep(1) with sched_yield()). Just
> make sure it keeps on working on AIX and Solaris and stuff like that,
> where Nagios compiles and runs just fine today.
>
> I'd prefer if you did it with a helper function to make it easier to
> support various operating systems that need it without duplicating a
> lot of code.
Hey, sorry to jump in. I just read the thread; why don't you use
semaphores fix this issue? Just increase it when a check starts,
decrease when a check stops, and do a blocking wait for 0 instead of
doing an arbitrary sleep.
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJ6Ke86dZ+Kt5BchYRAiWfAKC8MhnAt2GIhbZWT2atl98yVJchQwCeMGMq
AaE8XsKEq8KyHWyvu/tl+aY=
=+hzu
-----END PGP SIGNATURE-----
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]