lua-users home
lua-l archive

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


Rob wrote:
> > > This makes me wonder if LuaSocket doesn't play well when signals
> > > are thrown into the mix.  Has anybody else had similar issues with
> > > LuaSocket?  I'm told there's a whole world of pain when you start
> > > mixing signals and select() - are there any plans to let LuaSocket
> > > use poll() in any newer versions?  (Even if they're only for Lua
> > > 5)

Diego wrote:
> > From the top of my head, I don't remember reading anything against
> > using select with signals. If you could give me more hints about
> > what
> > could happen, I would be happy to discuss possible solutions with
> > you.

Taj wrote:
> one thing i noticed in usocket.c is that it doesn't check for EINTR
> after write(), sendto(), read(), recvfrom() etc. ?  the usual trick is
> to loop while you get EINTR:
>       do
>               ret = write(...);
>       while(ret < 0 && errno == EINTR)

Thanks for the remark, Taj!

This might be our problem. Rob, can you change this in your
source code and test if the bug goes away?

It makes a lot of sense and I am willing to add this to the
LuaSocket distribution.

Best regards,