[#688] mkmf.rb - add files to clean and distclean targets — Michal Rokos <michal@...>

Hi,

25 messages 2003/01/15
[#722] Re: [RFC] mkmf.rb - add files to clean and distclean targets — Mathieu Bouchard <matju@...> 2003/01/20

On Thu, 16 Jan 2003, Michal Rokos wrote:

[#740] Re: [RFC] mkmf.rb - add files to clean and distclean targets — matz@... (Yukihiro Matsumoto) 2003/01/21

Hi,

[#724] Symbols: More Functionality Wanted — Ryan Pavlik <rpav@...>

I've been discussing this for a bit on #ruby-lang on OPN (or freenode or

23 messages 2003/01/20
[#728] Re: Symbols: More Functionality Wanted — matz@... (Yukihiro Matsumoto) 2003/01/20

Hi,

[#743] Re: Symbols: More Functionality Wanted — "Pit Capitain" <pit@...> 2003/01/21

On 20 Jan 2003 at 15:49, Yukihiro Matsumoto wrote:

[#767] Re: Symbols: More Functionality Wanted — Mathieu Bouchard <matju@...> 2003/01/22

[#768] Re: Symbols: More Functionality Wanted — dblack@... 2003/01/22

Hi --

[#779] Re: Symbols: More Functionality Wanted — Gavin Sinclair <gsinclair@...> 2003/01/23

On Thursday, January 23, 2003, 6:28:04 AM, dblack wrote:

Re: Basic UNIXSocketDGram implementation

From: Matthew Bloch <mattbee@...>
Date: 2003-01-03 08:14:22 UTC
List: ruby-core #678
On Friday 03 January 2003 00:28, Matthew Bloch wrote:
[snip]
> This only seems to happen when trying to talk to a UNIX socket which is
> being handled by a hung User-Mode Linux process: my question is, I suppose,
> whether I can do anything in Ruby to avert this hanging / blocking effect,
> or whether I can detect that it might happen before calling send on the
> socket.

Please excuse me, I'm not sure how I managed to make setting non-blocking mode 
on the socket sound like such an alien concept, or indeed that it was much to 
do with Ruby specifically.  For the record and future internet searchers, the 
code now looks like this which will raise Errno::EWOULDBLOCK in such an 
event:

    @proxy = Socket.new(Socket::AF_UNIX, Socket::SOCK_DGRAM, 0)
    @proxy.bind(sockaddr_struct_un(path))
    flags = @proxy.fcntl(3) # F_GETFL
    flags |= File::NONBLOCK
    @proxy.fcntl(4, flags)  # F_SETFL
    @path = path

I'm still keen to know if anyone has done a less grotty implementation of UNIX 
datagram sockets though.

-- 
Matthew          > http://www.soup-kitchen.net/
                 > ICQ 19482073 > AIM MattbeeUK


In This Thread

Prev Next