Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-05
08:20 • Ticket [217834ffff] "close" blocks even for non-blocking pipel... artifact: 9534a1353a user: dgp
2000-10-26
07:59 • Closed ticket [217834ffff]. artifact: 26437e142a user: welch
00:44 • New ticket [217834ffff]. artifact: cec6bc76b6 user: nobody

"close" blocks even for non-blocking pipelines

Closed / Invalid217834ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:44:36
OriginalBugID: 1682 Bug
Version: 8.0.3
SubmitDate: '1999-03-31'
LastModified: '1999-11-07'
Severity: MED
Status: Closed
Submitter: pat
ChangedBy: hobbs
RelatedBugIDs: 710
OS: Solaris
OSVersion: SunOS hostname 5.7 Generic sun4u sparc SUNW,Ultra-5_10
Machine: Other
FixedDate: '2000-10-25'
ClosedDate: '1999-11-07'


Name:David F. Skoll

ReproducibleScript:
    I define this procedure in tclsh 8.0.3 on Solaris 2.7:
    
    proc nonblock {} {
        set fp [open "|sleep 120" "RDONLY NONBLOCK"]
        fconfigure $fp -blocking 0
        close $fp
    }

ObservedBehavior:
    Reading the "close" manual page (and in fact perusing the Tcl source
    code) I expect this procedure to return immediately to its caller.
    However, the "close" blocks until the "sleep" exits.  I thought that for
    non-blocking command pipelines, close was non-blocking too and that the
    children were reaped in the background.  Is this a real bug or just
    misunderstanding on my part?

DesiredBehavior:
    I expect an immediate return.
welch Closed ticket [217834ffff]. [History diff]2000-10-26 07:59:46
dgp Ticket [217834ffff]: 4 changes [History diff]2001-04-05 08:20:15
Log in (anonymous is fine) to add a comment.