bugGuile - Bugs: bug #27634, sleep does not work under windows...

 
 

bug #27634: sleep does not work under windows mingw

Submitted by:  Scott McPeak <smcpeak>
Submitted on:  Fri 09 Oct 2009 01:29:47 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 09 Oct 2009 01:29:47 AM UTC, original submission:

The implementation of sleep/usleep in Guile-1.8.7 uses select(), but that doesn't work on Windows using mingw:

guile> (sleep 1)
1 ; returned immediately
guile> (sleep 4)
4 ; returned immediately

On unix and on Windows under cygwin, these calls actually sleep, and return 0 normally.

Note: The select implementation on unix seems to rely on the "sleep pipe". I submitted a bug report including a patch that removes that pipe on mingw (bug 27573), but sleep doesn't work even with the pipe enabled.

The fix is straightforward, making 'sleep' and 'usleep' call 'Sleep' rather than 'select'. I assume that's how it was at some point in the past because scmsigs.c has definitions of 'sleep' and 'usleep' at the top of the file that are not currently used.

Suggested patch attached.

Scott McPeak <smcpeak>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #18834:  windows-sleep-fix.diff added by smcpeak (910B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by smcpeak (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 09 Oct 2009 01:29:47 AM UTCsmcpeakAttached File-=>Added windows-sleep-fix.diff, #18834

    Back to the top


    Powered by Savane 3.1-cleanup