Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-10-22
17:19 • Ticket [1106853fff] On Linux, exec >@channel may give incorrect error sta... artifact: f944d952d3 user: serhiy.storchaka
2026-10-21
10:03 • Closed ticket [1106853fff]. artifact: 288b9ad140 user: serhiy.storchaka
09:58 • Closed ticket [627552ffff]: bad pipe error message plus 4 other changes artifact: 13fd34d9e0 user: serhiy.storchaka
2005-01-21
17:33 • New ticket [1106853fff] On Linux, exec >@channel may give incorrect error... artifact: e31774ac9a user: nobody

On Linux, exec >@channel may give incorrect error

Closed / Fixed1106853fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 41 days ago
Descriptionplain2005-01-21 17:33:34
If I create a channel in C code with Tcl_CreateChannel
(passing in TCL_WRITABLE) then try to output to it
using exec, like so:

% exec ls >@channel

I get the error message (under Linux):

channel "foo" wasn't opened for writing

The actual cause of the error is that there's no file
handle associated with my channel. I don't mind that
this doesn't work, but the error message is confusing,
especially since the channel patently is open for
writing, since:

% puts channel "some string"

works fine.

This is with Tcl 8.4.7.
Referenced by1
serhiy.storchakawiki2026-10-21 10:03:37

Fixed in 8.5.8 and 8.6.0 by [9039eeb584] (8.5: [62c8e5320a]): for a channel without OS handles, exec redirection now reports channel "x" does not support OS handles instead of "wasn't opened for writing".

serhiy.storchaka Ticket [1106853fff]: 3 changes [History diff]2026-10-22 17:19:30
Log in (anonymous is fine) to add a comment.