Artifacts Associated With Ticket 218339
Ticket change [f9ffc5cd18] (rid 91794) by nobody on 2000-10-26 00:56:25:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 3985 RFE Version: 8.0.5 SubmitDate: '2000-01-06' LastModified: '2000-01-10' Severity: MED Status: Closed Submitter: techsupp ChangedBy: hobbs OS: Solaris FixedDate: '2000-10-25' ClosedDate: '2000-01-10' Name: Krzysztof Kozminski DesiredBehavior: Did anyone ever complain that Tcl pipes don't work very well with processes that pass out some of their output via exit status, such as the unix 'diff' command? I find this example rather annoying: % open [list | diff $file1 $file2 | wc] file7 % read file7 639 3230 19434 % close file7 child process exited abnormally There is nothing abnormal here; diff exits with status 1 if it finds differences. Presently, I have to do some ridiculous convolutions like: % open [list | /bin/sh -c "diff '$file1' '$file2';exit 0" | wc] which work fine until I have a filename with funny characters in it. Tcl pipe is much nicer in enabling me to work with arbitrary filenames. It would be nice to have some control over what exit status is considered abnormal. Perhaps something like: pid fileId pIndex -exitok expression where pIndex would be the address of the process in the pipe, and expression would be a Tcl expression in which '#' would stand for the exit status. In my example, I would do: % open "| diff .cshrc .login | wc" % pid file7 0 {(# == 0) == (# == 1)} Or maybe 'close' should return a list of exit status values for the user to decide whether they were abnormal or not. Something like: % close file7 -getexits 1 0 This RFE wants to allow for !0 exit codes to be considered "normal" exits, which goes against the grain of Tcl and the de facto standard for exit status. We understand that there are a few commands in Unix which return !0 after "normal" execution, but these can still be handled, and as special cases should be. -- 01/10/2000 hobbs - foundin initialized to: "final: 8.0.5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "63. (unused)"
- title initialized to: "Gripes about pipes"
- type initialized to: "Bug"
Ticket change [5b77661580] (rid 118332) by welch on 2000-10-26 08:20:07:
- closedate changed to: "2000-10-26T01:20:07"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [beb15a4213] (rid 102120) by dgp on 2001-04-01 01:47:57:
- subsystem changed to: "27. Channel Types"
Ticket change [0517923a94] (rid 88996) by dgp on 2001-04-01 01:47:59:
- closedate changed to: "2001-03-31T18:47:59"
- closer changed to: "dgp"