         arguments: [String],
         environment: [String: String],
         exitStatusCode: Int32,
+        normal: Bool,
         output: Result<[UInt8], Swift.Error>,
         stderrOutput: Result<[UInt8], Swift.Error>
     ) {
         let exitStatus: ExitStatus
       #if os(Windows)
-        exitStatus = .terminated(code: exitStatusCode)
+        if normal {
+            exitStatus = .terminated(code: exitStatusCode)
+        } else {
+            exitStatus = .abnormal(exception: UInt32(exitStatusCode))
+        }
       #else
         if WIFSIGNALED(exitStatusCode) {
             exitStatus = .signalled(signal: WTERMSIG(exitStatusCode))

            if result == -1 {
                self.state = .failed(SystemError.waitpid(errno))
            }
          #endif

            // Construct the result.

    public enum ExitStatus: Equatable {
        /// The process was terminated normally with a exit code.
        case terminated(code: Int32)
#if os(Windows)
        /// The process was terminated abnormally.
        case abnormal(exception: UInt32)
#else
        /// The process was terminated due to a signal.
        case signalled(signal: Int32)
#endif
