Artifacts Associated With Ticket 218588ffffffffff
Ticket change [0f1d688e75] (rid 94736) by nobody on 2000-10-26 01:02:47:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 1356 Bug Version: 8.0.3 SubmitDate: '1999-03-02' LastModified: '1999-12-03' Severity: CRIT Status: Released Submitter: pat ChangedBy: hobbs RelatedBugIDs: 710 OS: Solaris OSVersion: 2.5.1 Machine: Other FixedDate: '1999-12-03' FixedInVersion: 8.2.3 ClosedDate: '2000-10-25' Name: Jean M. Brouwers ObservedBehavior: After opening a command channel and after setting the channel option to non-blocking, the application hangs, occasionally. It turns out that system call waitpid() is being called with the options argument set to 0 and not WNOHANG. The call stack shows that waitpid() is called from TclCleanupChildren (in tclPipe.c), which is called by PipeCloseProc (in tclUnixPipe.c), CloseChannel (in tclIO.c), FlushChannel (intclIO.c), and ultimately Tcl_Close (in tclIO.c) DesiredBehavior: Tcl_Close should not be waiting for any child processes to finish if the command channel option is non-blocking. Closer inspection of the source code shows that PipeCloseProc does include the correct handling of this situation if flag isNonBlocking of the PipeState is set to non-zero. However, that flag is never set to anything else than zero. Proposed remedy: function PipeBlockModeProc (in tclUnixPipe.c) should set the flag isNonBlcoking correctly depending on the value of the mode argument passed in. --- 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: "application hangs on non-blocking command channel"
- type initialized to: "Bug"
Ticket change [0fa0a3ac3e] (rid 94817) by welch on 2000-10-26 08:25:09:
- closedate changed to: "2000-10-26T01:25:09"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [1d1e138f04] (rid 90738) 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"