Tcl Source Code

View Ticket
Login
Ticket UUID: cbbd2511cee8b8b8b03342577df9e181a27c5ba5
Title: tclWinPipe DETACHED_PROCESS vs. CREATE_NO_WINDOW
Type: Patch Created on: 2026-07-03 21:22:42
Submitter: teclab Assigned to: nobody
Subsystem: 69. Other Severity: Minor
Priority: 5 Medium Last modified: 2026-07-03 21:22:42
Status: Open Closed by: nobody
Resolution: None Closed on:
Version: 8.6 and 9.x
Description:
Dear Core Team,

In Windows wish 8.6 if you try the following:

exec powershell.exe -NoProfile -Command "dir"

This will return nothing.
With powershell this whole redirection fails. One has to compile tclWinPipe.c with:

createFlags = CREATE_NO_WINDOW;

It seems that with no console attached the powershell does not even run the command, failing silently:

exec powershell.exe -NoProfile -Command "dir | Out-File -Encoding utf8 C:/dir.txt"

The above command does not even generate the file.

Note that with tclsh all the above works, it only in wish that fails.

TCL 9 does have the same issue.