[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #495: tcp-abandon-port polarity reversed, I think
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #495: tcp-abandon-port polarity reversed, I think |
Date: |
Wed, 09 Feb 2011 00:48:33 -0000 |
#495: tcp-abandon-port polarity reversed, I think
----------------------------+-----------------------------------------------
Reporter: zbigniew | Owner: felix
Type: defect | Status: new
Priority: minor | Milestone: 4.7.0
Component: core libraries | Version: 4.6.x
Keywords: |
----------------------------+-----------------------------------------------
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!
--
Ticket URL: <http://bugs.call-cc.org/ticket/495>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #495: tcp-abandon-port polarity reversed, I think,
Chicken Trac <=