From: nobu.nokada@... Date: 2003-04-10T15:16:26+09:00 Subject: Re: TCPServer#accept blocking in Windows Hi, At Thu, 10 Apr 2003 08:28:44 +0900, Philip Mak wrote: > then while "server.accept" is running, Ctrl+C will not work to > terminate the program. It's one of restrictions on Windows version. Because interrupt is implemented in user code, it's dangerous while calling API and libraries which don't know about the interrupt. > How can I make Ctrl+C work while server.accept is running? Do I have > to run server.accept in another thread? A work around is using "watcher" thread. require 'socket' Thread.new {loop {sleep 0.01}} # <--- server = TCPServer.new('localhost', 8231) server.accept -- Nobu Nakada