Re: Test error for sockets.tst in current beta version (newly introduced)

Sam Steingold <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <[email protected]>
Hi Karsten,

> * Karsten Poeck <[email protected]> [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.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.