id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,difficulty 495,"tcp-abandon-port polarity reversed, I think",Jim Ursetto,Jim Ursetto,"To my understanding, (tcp-abandon-port x) is supposed to signal that port X should not be shutdown() when we close the Scheme port. If so, I think tcp-abandon-port is abandoning the wrong port, because it does: if input port: set slot 2 to #t if output port: set slot 1 to #t but the close procedure does if input port and slot 1 #t: ignore shutdown if output port and slot 2 #t: ignore shutdown tcp-abandon-port checks input/output port using (##sys#slot p 1) and I think that is where the bug is -- when #t, it sets slot 2, but #t means input-port. To reproduce, do something like {{{ (define-values (i o) (tcp-connect ""3e8.org"" 80)) (tcp-abandon-port o) (close-output-port o) }}} and note that the connection is closed even though the input port is still open. If this analysis is incorrect, I would appreciate an explanation of what the heck tcp-abandon-port is supposed to do!",defect,closed,minor,4.9.0,core libraries,4.6.x,fixed,,,