Skip to content
Tcl Source Code View Ticket
Login

View Ticket

execing command that starts with 2 fails

Pending2339907fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 5 days ago
Descriptionplain2008-11-24 20:09:59
Tcl Version: 8.4.19
OS: 32 bit and 64 bit Linux
Submitter: Robert Soliday ([email protected])
Problem Behavior:

When I try to exec a command of the name 2DSlider I get the error message:
illegal use of | or |& in command
tclPipe.c is flagging the number 2 as a redirection character.

For now I can just create a symlink with a different name but I just thought someone should know about this bug. It took me a while to figure out what the heck was happening.
Referenced by3
  • 0c63a59973Fix [2339907fff] and [1862356fff], regressions from [47d7a23bdf] check-in2026-11-27 12:30:00
  • 8eb6eafa7cTicket [1862356fff] arguments to TclCreatePipeline cannot start with '|' status still Open with 4 other changes ticket2026-10-17 07:04:13
  • 622c092a53Fix [2339907fff] and [1862356fff], regressions from [47d7a23bdf]: in the first pass of TclCreatePipeline() a command word starting with "2" (but not "2>") was not counted as a command, and a word starting with "|" (but not "|" or "|&") was taken as a bar, so both gave "illegal use of | or |& in command". check-in2026-10-17 07:02:30
dkf Ticket [2339907fff]: 2 changes [History diff]2008-11-25 05:01:25
serhiy.storchakawiki2026-10-17 07:04:13

Regression since 8.4.13 from [47d7a23bdf] (the fix for [768659]): in the first pass of TclCreatePipeline() a word starting with "2" that is not a "2>" redirection does not count as a command, so [exec 2DSlider] fails with "illegal use of | or |& in command". Proposed fix in branch exec-pipeline-words, test exec-23.1. It also fixes [1862356fff].

jan.nijtmanswiki2026-11-27 15:27:45

Merged to [trunk]

Log in (anonymous is fine) to add a comment.