stdout/stderr이 리디렉션되지 않으면 스크립트가 제대로 실행됩니다.powershell 스크립트의 stdout 및 stderr를 리디렉션 할 때 오류가 발생했습니다.
stderr과 stdout 리디렉션을 모두 추가하면 다음 오류가 표시됩니다. 어떻게 피할 수 있습니까?
http://www.leeholmes.com/blog/WorkaroundTheOSHandlesPositionIsNotWhatFileStreamExpected.aspx
이 PowerShell을 v1.0을 버그이며, 경우에 발생합니다
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 19.4M 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
81 19.4M 0 0 81 15.9M 0 54.5M --:--:-- --:--:-- --:--:-- 55.8M
100 19.4M 0 0 100 19.4M 0 14.2M 0:00:01 0:00:01 --:--:-- 14.3M
100 19.4M 0 0 100 19.4M 0 8428k 0:00:02 0:00:02 --:--:-- 8454k
100 19.4M 0 0 100 19.4M 0 5924k 0:00:03 0:00:03 --:--:-- 5937k
100 19.4M 0 0 100 19.4M 0 4567k 0:00:04 0:00:04 --:--:-- 4575k
100 19.4M 0 50 100 19.4M 10 4291k 0:00:04 0:00:04 --:--:-- 835k
out-lineoutput : The OS handle's position is not what FileStream expected. Do not use a handle simu
ltaneously in one FileStream and in Win32 code or another FileStream. This may cause data loss.
+ CategoryInfo : NotSpecified: (:) [out-lineoutput], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.OutLineOutputCom
mand
코드의 모양은 어떻습니까? – JasonMArcher
CURL.exe – ripper234
을 호출하는 일부 코드는 내 대답을 결코 받아들이지 않았습니다. @ ripper234 – x0n