René's URL Explorer Experiment


Title: Unpredictable ordering of native command output when merging the error stream into the success output stream · Issue #5424 · PowerShell/PowerShell · GitHub

Open Graph Title: Unpredictable ordering of native command output when merging the error stream into the success output stream · Issue #5424 · PowerShell/PowerShell

X Title: Unpredictable ordering of native command output when merging the error stream into the success output stream · Issue #5424 · PowerShell/PowerShell

Description: Steps to reproduce bash -c 'echo a; echo b >&2; echo c' 2>&1 On Windows, use cmd /c 'echo a & echo b >&2 & echo c' 2>&1. Additionally, in Windows PowerShell, append | % tostring. Note that it is the addition of 2>&1 that triggers the pro...

Open Graph Description: Steps to reproduce bash -c 'echo a; echo b >&2; echo c' 2>&1 On Windows, use cmd /c 'echo a & echo b >&2 & echo c' 2>&1. Additionally, in Windows PowerShell, append | % tostring. Note that it is th...

X Description: Steps to reproduce bash -c 'echo a; echo b >&2; echo c' 2>&1 On Windows, use cmd /c 'echo a & echo b >&2 & echo c' 2>&1. Additionally, in Windows...

Opengraph URL: https://github.com/PowerShell/PowerShell/issues/5424

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unpredictable ordering of native command output when merging the error stream into the success output stream","articleBody":"Steps to reproduce\r\n------------------\r\n\r\n```powershell\r\nbash -c 'echo a; echo b >&2; echo c' 2>&1\r\n```\r\n\r\nOn Windows, use `cmd /c 'echo a & echo b >&2 & echo c' 2>&1`.\r\nAdditionally, in _Windows PowerShell_, append `| % tostring`.\r\n\r\nNote that it is the addition of `2>&1` that triggers the problem.\r\n\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n```none\r\na\r\nb\r\nc\r\n```\r\nThat is, the output lines should be printed in the order written, across streams.\r\n\r\nActual behavior\r\n---------------\r\n\r\n_Intermittently_, the output order is unexpected in that the stderr output line is printed out of order; e.g.:\r\n\r\n```none\r\na\r\nc\r\nb\r\n```\r\n\r\nor \r\n\r\n```none\r\nb\r\na\r\nc\r\n```\r\n\r\nIf you have trouble seeing the symptom, try something like the following\r\n\r\nUnix:\r\n\r\n```powershell\r\nwhile ($true) { if (($a = bash -c 'echo a; echo b >&2; echo c' 2>&1)[1] -notmatch 'b') { $a; break} }\r\n```\r\n\r\nWindows:\r\n\r\n```powershell\r\nwhile ($true) { if (($a = cmd /c 'echo a & echo b >&2 & echo c' 2>&1 | % tostring)[1] -notmatch 'b') { $a; break}  }\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\r\n```powershell\r\nPowerShell Core v6.0.0-beta.9 on macOS 10.13\r\nPowerShell Core v6.0.0-beta.9 on Ubuntu 16.04.3 LTS\r\nPowerShell Core v6.0.0-beta.9 on Microsoft Windows 10 Pro (64-bit; v10.0.15063)\r\nWindows PowerShell v5.1.15063.674 on Microsoft Windows 10 Pro (64-bit; v10.0.15063)\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2017-11-12T03:11:47Z","url":"https://github.com/PowerShell/PowerShell/issues/5424"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8b4f1607-34c3-eb42-59ee-f1b54d0bddb3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE93E:31E3B3:15B51F:1D7D98:6AFD4D75
html-safe-noncee8950cf5de7479d0118b0f0bc90c67b75dff6a1f9fa9af1f488dc1aa8d5ac7c1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTNFOjMxRTNCMzoxNUI1MUY6MUQ3RDk4OjZBRkQ0RDc1IiwidmlzaXRvcl9pZCI6IjczODQyMjI2MTk2NTU4MTg2MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbe8d180bd70aa9d753143279ce15dcb3239041db3739666e95e48e31e378f7f6
hovercard-subject-tagissue:273195201
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/5424/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5d54e5535a1cc22ab0cf7fce1b1a5c5beb2f0b9138929df75814271765e367c8/PowerShell/PowerShell/issues/5424
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5d54e5535a1cc22ab0cf7fce1b1a5c5beb2f0b9138929df75814271765e367c8/PowerShell/PowerShell/issues/5424
og:image:altSteps to reproduce bash -c 'echo a; echo b >&2; echo c' 2>&1 On Windows, use cmd /c 'echo a & echo b >&2 & echo c' 2>&1. Additionally, in Windows PowerShell, append | % tostring. Note that it is th...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemklement0
hostnamegithub.com
expected-hostnamegithub.com
None66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb6f01f7cb9f35f8c09949773241a3d49dd04b340
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/5424#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F5424
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F5424
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/5424
Reloadhttps://github.com/PowerShell/PowerShell/issues/5424
Reloadhttps://github.com/PowerShell/PowerShell/issues/5424
PowerShellhttps://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Codehttps://github.com/PowerShell/PowerShell
Issues1.3k (1.3k)https://github.com/PowerShell/PowerShell/issues
Pull requests365 (365)https://github.com/PowerShell/PowerShell/pulls
Discussionshttps://github.com/PowerShell/PowerShell/discussions
Actionshttps://github.com/PowerShell/PowerShell/actions
Projectshttps://github.com/PowerShell/PowerShell/projects
Security and quality3 (3)https://github.com/PowerShell/PowerShell/security
Insightshttps://github.com/PowerShell/PowerShell/insights
https://github.com/PowerShell/PowerShell
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/5424
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/5424
Unpredictable ordering of native command output when merging the error stream into the success output streamhttps://github.com/PowerShell/PowerShell/issues/5424#top
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Nov 12, 2017https://github.com/PowerShell/PowerShell/issues/5424#issue-273195201
Nexthttps://github.com/PowerShell/PowerShell/issues/5424?timeline_page=1
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
on Nov 12, 2017https://github.com/PowerShell/PowerShell/issues/5424#event-1337450969
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
6.1.0-Considerhttps://github.com/PowerShell/PowerShell/milestone/26
on Nov 12, 2017https://github.com/PowerShell/PowerShell/issues/5424#event-1337450983
Michael Klement (mklement0)https://github.com/mklement0
on Nov 12, 2017https://github.com/PowerShell/PowerShell/issues/5424#event-1337797547
https://github.com/PetSerAl
PetSerAlhttps://github.com/PetSerAl
on Dec 18, 2017https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-352329619
https://github.com/redvers
Redvers Davies (redvers)https://github.com/redvers
on Feb 9, 2018https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-364589661
https://github.com/redvers
Redvers Davies (redvers)https://github.com/redvers
on Feb 9, 2018https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-364602582
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
6.1.0-Considerhttps://github.com/PowerShell/PowerShell/milestone/26
on Feb 10, 2018https://github.com/PowerShell/PowerShell/issues/5424#event-1467762657
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
Resolution-AnsweredThe question is answered.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Answered%22
on Feb 10, 2018https://github.com/PowerShell/PowerShell/issues/5424#event-1467763193
https://github.com/SteveL-MSFT
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on Feb 10, 2018https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-364606720
Redvers Davies (@redvers)https://github.com/redvers
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 10, 2018https://github.com/PowerShell/PowerShell/issues/5424#event-1467763508
https://github.com/redvers
Redvers Davies (redvers)https://github.com/redvers
on Feb 10, 2018https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-364619665
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 11, 2018https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-364717786
Redvers Davies (@redvers)https://github.com/redvers
Steve Lee (@SteveL-MSFT)https://github.com/SteveL-MSFT
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 11, 2018https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-364718492
PetSerAlhttps://github.com/PetSerAl
https://github.com/PetSerAl
PetSerAlhttps://github.com/PetSerAl
on Feb 11, 2018https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-364723761
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 11, 2018https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-364726987
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
6.2.0-Considerhttps://github.com/PowerShell/PowerShell/milestone/42
Futurehttps://github.com/PowerShell/PowerShell/milestone/48
on Jun 21, 2018https://github.com/PowerShell/PowerShell/issues/5424#event-1694661057
https://github.com/npodbielski
npodbielskihttps://github.com/npodbielski
on Sep 15, 2019https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-531546881
#10539https://github.com/PowerShell/PowerShell/issues/10539
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on Sep 16, 2019https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-531649130
https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/NativeCommandProcessor.cs#L1182https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/NativeCommandProcessor.cs#L1182
https://avatars0.githubusercontent.com/u/11524380?s=400&v=4
https://camo.githubusercontent.com/367743aeb3919fb6453d8d3b9052f46876bfbe1f90944156efcb74377ed6a6f8/68747470733a2f2f6769746875622e6769746875626173736574732e636f6d2f66617669636f6e2e69636f
PowerShell/PowerShellhttps://github.com/PowerShell/PowerShell
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on Sep 16, 2019https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-531649493
Paul Higinbotham (@PaulHigin)https://github.com/PaulHigin
https://github.com/beatcracker
beatcrackerhttps://github.com/beatcracker
on Jun 21, 2021https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-865101023
https://github.com/vexx32
Rain Sallow (/u/ta11ow) (vexx32)https://github.com/vexx32
on Jun 21, 2021https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-865127639
https://github.com/beatcracker
beatcrackerhttps://github.com/beatcracker
on Jun 21, 2021https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-865185259
Rain Sallow (/u/ta11ow) (@vexx32)https://github.com/vexx32
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Aug 5, 2023https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-1666500961
beatcrackerhttps://github.com/beatcracker
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
on Feb 2, 2024https://github.com/PowerShell/PowerShell/issues/5424#event-11680621559
https://github.com/apps/microsoft-github-policy-service
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
on Feb 2, 2024https://github.com/PowerShell/PowerShell/issues/5424#issuecomment-1923280312
Microsoft GitHub Policy Servicehttps://aka.ms/1es-gitops
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
Futurehttps://github.com/PowerShell/PowerShell/milestone/48
on Feb 9, 2024https://github.com/PowerShell/PowerShell/issues/5424#event-11757821336
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 9, 2024https://github.com/PowerShell/PowerShell/issues/5424#event-11757821356
Billy O'Neal (BillyONeal)https://github.com/BillyONeal
on Sep 22, 2026https://github.com/PowerShell/PowerShell/issues/5424#event-31634612615
Change Run-VcpkgAndCaptureBoth to join the pipes using cmd or sh rath…https://github.com/BillyONeal/vcpkg-tool/commit/625e0d37027027e3df2b7dd890e2d3b92a0b01a2
625e0d3https://github.com/BillyONeal/vcpkg-tool/commit/625e0d37027027e3df2b7dd890e2d3b92a0b01a2
Change Run-VcpkgAndCaptureBoth to join the pipes using cmd or sh rath…https://github.com/microsoft/vcpkg-tool/commit/e61a34f53490cb57cc9a75697237ac8b72ca7b3e
e61a34fhttps://github.com/microsoft/vcpkg-tool/commit/e61a34f53490cb57cc9a75697237ac8b72ca7b3e
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/5424
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/5424
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.