Overview
| Artifact ID: | a935be57bba1a5b0b51343cc68c3abcfc4fd16a1 |
|---|---|
| Ticket: | 218492ffffffffffffffffffffffffffffffffff
close waits for process to complete (should reap in backgrou |
| User & Date: | nobody on 2000-10-26 01:01:17 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "obsolete: 8.0.3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "60. NRE and coroutines"
- title changed to:
close waits for process to complete (should reap in backgrou
- type changed to: "Bug"