Artifacts Associated With Ticket 218492
Ticket change [a935be57bb] (rid 99117) by nobody on 2000-10-26 01:01:17:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 710 Bug Version: 8.0.3 SubmitDate: '1998-10-13' LastModified: '1999-12-03' Severity: SER Status: Released Submitter: admin ChangedBy: hobbs RelatedBugIDs: 1356 1417 1682 5924 OS: All Unix FixedDate: '1999-12-03' FixedInVersion: 8.2.3 ClosedDate: '2000-10-25' This is a bug that was officially fixed at 7.5p1 (below is an entry in the 'changes' file:) 6/10/96 (bug fix) Changes the Tcl close command so that it no longer waits on nonblocking pipes for the piped processes to exit; instead it reaps them in the background. (JL) Today, 8.0.3, at least on Solaris and NT, but I think also everywhere else, the following code blocks on close: set f [open "|cmd" r] fconfigure $f -blocking 0 close $f (where cmd is something that sleeps, writing nothing, e.g. sleep 9999) So the problem is what's called 'reaping in the background'. Apparently (looking at the source) it is done in foreground. Note anyway that on unix at least, all this is handled in a very strange way. A more natural implementation would register a SIGCHLD handler which would *then* trigger the reaping. 4/17/99 - redman - confirmed on NT with 8.1b3+. The close is waiting for the process to complete. >My vote: although it's an annoying little problem, >it's been there for a while and will take too much >time to fix for 8.1. Maybe we can get to these in >8.1.1. -- Scott R. Confirmed with 8.2 on Sol7. -- 10/21/1999 hobbs Adding psPtr->isNonBlocking = (mode == TCL_MODE_NONBLOCKING); before the return in unix/tclUnixPipe.c:PipeBlockModeProc seems to solve the problem. -- 11/29/1999 hobbs - foundin initialized to: "obsolete: 8.0.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "60. NRE and coroutines"
- title initialized to:
close waits for process to complete (should reap in backgrou
- type initialized to: "Bug"
Ticket change [74a70a2244] (rid 105245) by welch on 2000-10-26 08:23:17:
- closedate changed to: "2000-10-26T01:23:17"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [b4a755b29a] (rid 125078) by dgp on 2001-04-05 08:20:13:
- closedate changed to: "2001-04-05T01:20:13"
- closer changed to: "dgp"
- subsystem changed to: "27. Channel Types"