[RFC] - strange issue on notification filter aka time is not like time?

Hendrik Baecker andurin at process-zero.de
Tue May 12 16:40:04 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Andreas Ericsson schrieb:
>>
>> Can someone please tell me, that it shouldn't matter what I've
>> changed?
>>
>
>
> The change shouldn't matter in the slightest, unless your compiler
> is doing something strange and optimizes the call to time() away
> when it really shouldn't. It could though, if the stack is
> clobbered somehow. Enabling -Wmissing-prototypes and see if that
> triggers anything in the functions in question should give you a
> clue in that case.
I'll try the missing-prototypes asap.
>
> Can you run this small piece of code and let me know what you get?
>
> ...
>
> Here, I get ret: 1242137092 ret: 1242137092 time(NULL): 1242137092
> time(&now): 1242137092
>
ret: 1242139053
ret: 1242139053
time(NULL): 1242139053
time(&now): 1242139053

As I would expect...
> right now, which is the expected behaviour. If either of your
> figures don't match up (barring 1sec difference in case your clock
> ticks, ofc), something is wrong in your library.
>
> Also, it might be worth trying to recompile Nagios with -O1 instead
> of -O2 and re-run the notification debugging. That will turn off
> sibling call optimization and should make gcc take slightly better
> care of the stack.
>
I'll catch this up tomorrow morning...
Thanks to acknowledge, that I'm not insane in time()traveling ;)

- -
Hendrik

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
 
iD8DBQFKCYpElI0PwfxLQjkRAhVPAJ9jMGbaNuwZUyy3YyqxtnY9OJ2IMgCeID0j
T280c9OpP3nTu3tWCOuoGII=
=/XmP
-----END PGP SIGNATURE-----


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com




More information about the Developers mailing list