Skip to content

Fix os.q's sleep on Windows when stdin is redirected #758

Description

@Jebiel

TorQ's current Windows implementation of os.sleep uses timeout.exe:

sleep:{x:string x; system("sleep ",x;"timeout /t ",x," >nul")[NT]}

When standard input is redirected, timeout.exe can fail because it expects an interactive console.

This can prevent RDB/IDB startup retries from working as intended and surface misleading os file-load errors instead.

Using non-interactive PowerShell Start-Sleep avoids this dependency on stdin:

sleep:{x:string x; system("sleep ",x;"powershell.exe -NoProfile -NonInteractive -Command Start-Sleep -Seconds ",x)[NT]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions