bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #27634] sleep does not work under windows mingw


From: Scott McPeak
Subject: [bug #27634] sleep does not work under windows mingw
Date: Fri, 09 Oct 2009 01:29:48 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

URL:
  <http://savannah.gnu.org/bugs/?27634>

                 Summary: sleep does not work under windows mingw
                 Project: Guile
            Submitted by: smcpeak
            Submitted on: Fri 09 Oct 2009 01:29:47 AM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 09 Oct 2009 01:29:47 AM GMT  Name: windows-sleep-fix.diff  Size:
910B   By: smcpeak

<http://savannah.gnu.org/bugs/download.php?file_id=18834>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27634>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]