interrupted sleep returns wrong value

Egor Duda deo@logos-m.ru
Fri Sep 15 12:27:00 GMT 2000


Hi!

  SUSv2 says:

    If sleep() returns because the requested time has elapsed, the value
    returned will be 0. If sleep() returns because of premature arousal due to
    delivery of a signal, the return value will be the "unslept" amount (the
    requested time minus the time actually slept) in seconds.

attached patch accomplish this.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
interrupted-sleep-ret-val.ChangeLog
interrupted-sleep-ret-val.diff

-------------- next part --------------
2000-09-15  Egor Duda  <deo@logos-m.ru>

	* signal.cc (sleep): If interrupted by signal, return the
	requested time minus the time actually slept.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interrupted-sleep-ret-val.diff
Type: text/x-diff
Size: 964 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20000915/1490e0d0/attachment.bin>


More information about the Cygwin-patches mailing list