From: Sam S. <sd...@gn...> - 2017-03-20 17:39:27
|
Hi Karsten, > * Karsten Poeck <Xnefgra.Cbrpx@tznvy.pbz> [2017-03-20 15:29:15 +0100]: > > (SOCKET-CONNECT (SOCKET-SERVER-PORT *SERVER*) "localhost" :TIMEOUT 0) > [OS-ERROR]: OS-ERROR(6): Device not configured The problem is the failure of the ioctl(fd,FIONBIO,&non_blocking_io) call in socket.d:connect_via_ip() (line 830). (I think that function is additionally broken on that line because it does not close fd before returning INVALID_HANDLE). The solution is to use the newer interface (fcntl+O_NONBLOCK) as is done in unix.d and documented in http://www.kegel.com/dkftpbench/nonblocking.html http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html http://stackoverflow.com/q/1150635/850781 Problems: 1. win32: *NO_BLOCK* macros are not defined (I guess the current code can be reused). Can someone with access to win32 find out whether FIONBIO is defined there? 2. NO_BLOCK_DECL includes a function call. I think it can be safely moved to START_NO_BLOCK. At any rate, I pushed a patch which fixes the problem for me. Thanks for the report. -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://memri.org https://ffii.org http://think-israel.org https://jihadwatch.org People hear what they want to hear and discard the rest. |