chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #1017: socket-receive blocks for connectionless socke


From: Chicken Trac
Subject: [Chicken-janitors] #1017: socket-receive blocks for connectionless sockets
Date: Fri, 14 Jun 2013 20:27:39 -0000

#1017: socket-receive blocks for connectionless sockets
------------------------+---------------------------------------------------
 Reporter:  zbigniew    |       Owner:  zbigniew
     Type:  defect      |      Status:  new     
 Priority:  major       |   Milestone:  someday 
Component:  extensions  |     Version:          
 Keywords:  socket egg  |  
------------------------+---------------------------------------------------
 klm identified a bug in the socket egg; nonblocking mode is only set
 during a socket-connect or socket-accept, which won't be called for UDP.
 Test case attached.

 Temporary workaround: (use posix) and then, after creating the socket, do
 either:

 (##sys#file-nonblocking! (socket-fileno *socket*))

 or equivalently

 (file-control fcntl/setfl (socket-fileno *socket*)
  (bitwise-ior (file-control fcntl/getfl (socket-fileno *socket*))
               open/nonblock))

 Neither workaround will work on Windows.

 Permanent fix: We should probably make all sockets nonblocking at creation
 time instead, since our machinery assumes nonblocking sockets.  We could
 expose the set-nonblocking operation to the user, but since TCP is always
 nonblocking, doing this only for UDP would be strange.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/1017>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]