patch: sleep/nanosleep bug

Eric Blake ebb9@byu.net
Fri Nov 20 14:16:00 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Christopher Faylor on 11/18/2009 1:47 PM:
> On Wed, Nov 18, 2009 at 01:13:53PM -0700, Eric Blake wrote:
>> 2009-11-18  Eric Blake  <ebb9@byu.net>
>>
>> 	* signal.cc (nanosleep): Support 'infinite' sleep times.
>> 	(sleep): Avoid uninitialized memory.
> 
> Sorry but, while I agree with the basic idea, this seems like
> unnecessary use of recursion.  It seems like you could accomplish the
> same thing by just putting the cancelable_wait in a for loop.  I think
> adding recursion here obfuscates the function unnecesarily.

How about the following, then?  Same changelog.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----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/

iEYEARECAAYFAksGpIwACgkQ84KuGfSFAYBvGACggqFBOQYWN1zzy4opgYkvshmi
erIAnirblvNhSsDBd8Ds+3CeRUyea08F
=htPq
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygwin.patch33
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20091120/da899b5d/attachment.ksh>


More information about the Cygwin-patches mailing list