News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
New murgaLua 0.5.5 release !!
Author Message
observer
Junior Member
**


Posts: 6
Group: Registered
Joined: Aug 2007
Status: Offline
Reputation: 0
Post: #1
RE: New murgaLua 0.5.5 release !!

FWIW. This patch (using usleep instead of nanosleep directly) in luasocket-2.0.1/src/timeout.c seems to work for me (Cygwin, using X11 and not Win32).

Doug@DOUGS_XP ~/murgalua/murgaLua/3rd-party/luasocket-2.0.1/src

$ diff timeout.c.bak timeout.c
19a20
> #include <unistd.h>
21a23
>
198,206c200
< struct timespec t, r;
< t.tv_sec = (int) n;
< n -= t.tv_sec;
< t.tv_nsec = (int) (n * 1000000000);
< if (t.tv_nsec >= 1000000000) t.tv_nsec = 999999999;
< while (nanosleep(&t, &r) != 0) {
< t.tv_sec = r.tv_sec;
< t.tv_nsec = r.tv_nsec;
< }
---
> usleep((useconds_t) n * 1000000 );
221,229c215
< struct timespec t, r;
< t.tv_sec = (int) n;
< n -= t.tv_sec;
< t.tv_nsec = (int) (n * 1000000);
< if (t.tv_nsec >= 1000000000) t.tv_nsec = 999999999;
< while (nanosleep(&t, &r) != 0) {
< t.tv_sec = r.tv_sec;
< t.tv_nsec = r.tv_nsec;
< }
---
> usleep((useconds_t) n * 1000 );

08-03-2007 06:11 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
New murgaLua 0.5.5 release !! - JohnMurga - 07-31-2007, 06:02 AM
RE: New murgaLua 0.5.5 release !! - chrimo - 07-31-2007, 07:57 AM
RE: New murgaLua 0.5.5 release !! - chrimo - 07-31-2007, 07:48 PM
RE: New murgaLua 0.5.5 release !! - observer - 08-03-2007 06:11 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: