The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →A Windows agent runner can report a command failure even when the command never started. In one September 2026 incident on a Windows Server 2022 host, a shell returned 0xC0000142—STATUS_DLL_INIT_FAILED—before it could execute a requested command. The failure varied by executable class and sandbox tier, but the evidence did not establish a universal Windows sandbox bug or a single fix.
What failed—and how the exit code changed the diagnosis
The incident author, pm25coder of the emrg agent project, reported this error: *** fatal error - couldn't create signal pipe, Win32 error 5, alongside exit code 3221225794, or hexadecimal 0xC0000142. A bare shell invocation with no output returned the same status. That pattern led the author to suspect the process was failing during initialization, before reaching the requested command.
As an Amazon Associate I earn from qualifying purchases.
This distinction matters: a tool can present the result as “your command failed” even if the command never ran. Microsoft documents that process creation may return before a child finishes initializing; if a required DLL cannot be found or fails to initialize, the child can terminate. The termination status can be retrieved with GetExitCodeProcess. In practice, preserve that status and show it in the failure message rather than collapsing it into a generic command error.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsAs the author put it: “An exit code is the one fact that survives dead stdio.”
#1 Best Overall
Why the initial shell theory did not explain the failure
The author first suspected a process-boundary shell was trying to run bash -c on Windows, where bash was unavailable. Mounting PowerShell corrected that shell mismatch, but did not resolve the startup failure described in the incident. The account also says the replacement tool’s description warned it had been ported but not verified on Windows hardware, and that its tests injected dependencies instead of spawning a real process. Those are details from the author’s account, not an independent audit of the project or its tests.
Which executables failed in the reported tests
On the same host and tier, the author reports that six tested tools—grep.exe, sed.exe, whoami.exe, find.exe, awk.exe and bash.exe—failed with the signal-pipe error. The tested git --version and gh --version commands worked. The author found msys-2.0.dll in usr\bin, but not in the other listed directories: mingw64\bin, cmd, bin and libexec\git-core. The report says the affected tools loaded the MSYS2 runtime, while the tested Git executables did not show the failure.
Rank #2
The directory counts—244 executables in usr\bin and 48 in mingw64\bin—are the author’s counts on this host, not broad compatibility statistics. The report also gives Git for Windows 2.46.0.windows.1 and gh 2.58.0 as environment details; those versions are not current-version recommendations. The observed grouping is a useful lead for reproducing this incident, not proof that MSYS2-linked programs generally fail in Windows sandboxes.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →How the reported outcome changed by sandbox tier
The author compared two child-process classes across two confinement tiers on the same reported host:
| Confinement tier | Non-MSYS children (pwsh, git, python) |
MSYS2 children (grep, sed, bash) |
|---|---|---|
| Read-only | Started | Failed with 0xC0000142 |
| Workspace-write | Failed with 0xC0000142 |
Failed with 0xC0000142 |
This is a report of one host’s measurements, not a Windows compatibility guarantee. It does show why a useful reproduction record needs both the executable/runtime class and the confinement tier: changing either axis can change the observed result.
What might have caused it—and what remains unproven
Windows restricted tokens can remove privileges, mark SIDs deny-only, or include restricting SIDs. For a restricted process, access must pass checks against both enabled SIDs and the restricting SID list. That explains how confinement can deny access to securable objects; it does not establish which token configuration this runner used or why a particular child failed. See Microsoft’s documentation on restricted tokens.
Rank #4
Named-pipe access is controlled by a security descriptor and access checks against the caller’s token, as described in Microsoft’s named-pipe security documentation. The author proposed that MSYS2’s temporary-area or named-pipe setup might be blocked by confinement, and that a write-restricted token might interfere with default-object setup. These are plausible avenues to investigate, not confirmed causes: the available evidence does not show that named-pipe creation, temporary-path access or a specific token restriction triggered this failure.
Recommended Free Tools
Microsoft also documents initialization failures involving window-station or desktop access and desktop-heap exhaustion. That is further context for why a child can fail before doing useful work, but those documented cases describe different symptoms and do not explain this incident’s 0xC0000142 result. See processes and threads.
A practical sequence for diagnosing a shell that dies before a command
- Preflight the actual mounted shell. At registration time, spawn a no-op through the shell the runner will really use. This can reveal a shell that cannot start before users encounter failures across many commands.
- Preserve and report the exit code. On every failed spawn, include the numeric status and, where useful, its hexadecimal form. A generic command-failure message hides the distinction between a command returning an error and a child terminating during initialization.
- Inspect the child’s environment. Print
PATHfrom inside the confined child. The host process’s path does not necessarily describe the environment inherited by a sandboxed process. - Group failures by shared runtime or dependency. In this report, the affected examples clustered around tools reported to load the MSYS2 runtime. Investigating that shared mechanism is more informative than treating every executable as an unrelated failure.
- Test a real process spawn. Resolve the executable and spawn the binary returned by resolution. A mocked or dependency-injected process call can test surrounding logic, but cannot establish that the target binary initializes on the platform.
- Record the confinement tier with each result. Keep the host, child executable and tier together in logs or reproduction notes so that outcomes from read-only and workspace-write runs are not conflated.
What this incident establishes
The report supports a narrow conclusion: on one Windows Server 2022 host, startup outcomes differed across tested executable classes and confinement tiers, and preserving the exit status helped reveal that the failure could precede command execution. It does not prove a universal Windows sandbox defect, identify a definitive root cause, or establish a fix that will work in other environments.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




