We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3cc5ec3 + a8550d0 commit 1af28b2Copy full SHA for 1af28b2
Sources/Foundation/Process.swift
@@ -631,8 +631,9 @@ open class Process: NSObject {
631
// 3 to be an abnormal exit.
632
var dwExitCode: DWORD = 0
633
GetExitCodeProcess(process.processHandle, &dwExitCode)
634
- if (dwExitCode & 0xF0000000) == 0xC0000000
635
- || (dwExitCode & 0xF0000000) == 0xE0000000
+ if (dwExitCode & 0xF0000000) == 0x80000000 // HRESULT
+ || (dwExitCode & 0xF0000000) == 0xC0000000 // NTSTATUS
636
+ || (dwExitCode & 0xF0000000) == 0xE0000000 // NTSTATUS (Customer)
637
|| dwExitCode == 3 {
638
process._terminationStatus = Int32(dwExitCode & 0x3FFFFFFF)
639
process._terminationReason = .uncaughtSignal
0 commit comments