             if result == -1 {
                 self.state = .failed(SystemError.waitpid(errno))
             }
+            let normalExit = !WIFSIGNALED(result)
           #endif
 
             // Construct the result.

            switch result.exitStatus {
            case .terminated(let code):
                stream <<< "terminated(\(code)): "
#if !os(Windows)
            case .signalled(let signal):
                stream <<< "signalled(\(signal)): "
#endif

    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
