Summary

unix-sockets: port-data is set incorrectly

Metadata

Attachments

Description

The data slot of ports returned by unix-sockets's io-ports procedure is set incorrectly:

 #;1> (use unix-sockets)
 ; loading /usr/lib/chicken/6/unix-sockets.import.so ...
 ; loading /usr/lib/chicken/6/easyffi.import.so ...
 ; loading /usr/lib/chicken/6/unix-sockets.so ...
 #;2> (unix-connect "/tmp/foo.sock")
 #<input port "(unix)">
 #<output port "(unix)">
 ; 2 values
 #;3> (##sys#port-data #2)
 #(#(3 #f #f))

The attached patch fixes this by using ##sys#set-port-data!. I hope this procedure isn't too recent!

By the way, it looks like unix-sockets depends on easyffi merely for the #> <# read syntax. Maybe this dependency could be gotten rid of?

Changes and comments

[2011-12-23 17:42:41 UTC] syn attached fix-setting-of-port-data.patch (description=#f)

[2012-04-16 15:15:11 UTC] felix removed milestone 4.8.0

[2013-02-03 21:39:45 UTC] sjamaan changed status from new to assigned

[2013-02-03 21:39:45 UTC] sjamaan set owner to felix

[2013-02-03 22:31:28 UTC] felix wrote:

Replying to syn: > By the way, it looks like unix-sockets depends on easyffi merely for the #> <# read syntax. Maybe this dependency could be gotten rid of?

It actually uses "#>! ... <#".

[2013-02-03 22:31:53 UTC] felix changed status from assigned to closed

[2013-02-03 22:31:53 UTC] felix set resolution to fixed

[2013-02-03 22:31:53 UTC] felix wrote:

Patch applied (1.8), thanks very much.