Hi all,

finally, after hours of tracing and debugging, Mansur and I could locate
the problem!

We found that the socket was unexpectedly in non-blocking mode, causing
the read operation to return nonsense data.

It resulted from the fact that new sockets returned from accept() in BSD
inherit the flags from the parent socket. From the man page:

   On Linux, the new socket returned by accept() does not inherit file
   status flags such as O_NONBLOCK and O_ASYNC from the listening
   socket. This behavior differs from the canonical BSD sockets
   implementation. Portable programs should not rely on inheritance or
   noninheritance of file status flags and always explicitly set all
   required flags on the socket returned from accept().

Because PicoLisp temporarily sets the socket to non-blocking before
calling accept(), this was inherited to the new socket on FreeBSD (but
not on Linux).

Released a new version ( to the repo, and -- as ever -- to

♪♫ Alex
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to