[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: usleep
From: |
Eric Blake |
Subject: |
Re: usleep |
Date: |
Wed, 18 Nov 2009 17:56:29 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Ludovic Courtès on 11/18/2009 4:35 PM:
>> + {
>> + seconds -= limit;
>> + unsigned int result = sleep (limit);
>
> This declaration-after-statement is a C99 thing. Isn’t it something
> usually avoided in Gnulib?
Yep. I'll fix it in my respin. Besides, I found out that rpl_nanosleep
needs the same bug fix, and not only that, but it has a logic bug - it
ignores EINTR, forcing the sleep to last until a fatal signal or the
entire time has elapsed, on systems where the remaining time properly
decreases. Worse, it goes into an infinite 100% CPU busy loop on cygwin
1.5.x (where the result is always -1 for EINVAL on large enough time, and
the time remaining never decreases). Note, however, that my claim that
rpl_nanosleep is broken is by inspection only, since I don't want to wait
7 weeks to prove that 'sleep 50d' will eventually exit ;)
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksEl70ACgkQ84KuGfSFAYBP6wCePS/MBrvwD7K0P0leKI1e6Hdn
RF8AoJdmyM09oVvPr7kq56p1ksTBcH3h
=CHGq
-----END PGP SIGNATURE-----
- Re: pending patches?, Eric Blake, 2009/11/13
- Re: pending patches?, Eric Blake, 2009/11/13
- Re: pending patches?, Pádraig Brady, 2009/11/13
- Re: pending patches?, Jim Meyering, 2009/11/14
- Re: pending patches?, Eric Blake, 2009/11/14
- usleep (was: pending patches?), Eric Blake, 2009/11/18
- Re: usleep (was: pending patches?), Eric Blake, 2009/11/18
- Re: usleep, Ludovic Courtès, 2009/11/18
- Re: usleep,
Eric Blake <=
- Re: usleep, Eric Blake, 2009/11/19
- Re: usleep, Eric Blake, 2009/11/20
- Re: pending patches?, Eric Blake, 2009/11/14
- OpenBSD chown (was: pending patches?), Eric Blake, 2009/11/17
- Re: OpenBSD chown, Eric Blake, 2009/11/18