From: Matthew Bloch Date: 2002-03-04T17:37:45+09:00 Subject: Re: UNIX domain sockets madness Answering my own question, ah well: > My problem is that the background window code seems to block indefinitely > the first time you try to read anything from it after accepting a > connection: > > @server = UNIXServer.new("/tmp/throwback-socket-:0.0") > ... > @thread = Thread.new() { > begin > print "Starting accept\n" > timeout(5) { client = @server.accept } > rescue TimeoutError > print "Timeout on accept, exiting\n" > @server.close > Thread.exit > end And of course what happens to 'client' after we exit the begin / end block ? It's not there, of course, because I should've declared it as local *outside* of the block. I guess my question now is why didn't I see an exception thrown for trying to access a duff reference? -- Matthew