<!--
{
  "availability" : [
    "Swift: 6.2.0 -",
    "Xcode: 26.0.0 -",
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "swift: 6.0.0 -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Testing",
  "identifier" : "/documentation/Testing/ExitStatus",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Swift Testing"
    ],
    "preciseIdentifier" : "s:7Testing10ExitStatusO"
  },
  "title" : "ExitStatus"
}
-->

# ExitStatus

An enumeration describing possible status a process will report on exit.

```
enum ExitStatus
```

## Overview

You can convert an instance of this type to an instance of
[`ExitTest.Condition`](/documentation/Testing/ExitTest/Condition) using [`init(_:)`](/documentation/Testing/ExitTest/Condition/init(_:)). That value
can then be used to describe the condition under which an exit test is
expected to pass or fail by passing it to
[`expect(processExitsWith:observing:_:sourceLocation:performing:)`](/documentation/Testing/expect(processExitsWith:observing:_:sourceLocation:performing:)) or
[`require(processExitsWith:observing:_:sourceLocation:performing:)`](/documentation/Testing/require(processExitsWith:observing:_:sourceLocation:performing:)).

## Topics

### Enumeration Cases

[`case exitCode(CInt)`](/documentation/Testing/ExitStatus/exitCode(_:))

The process exited with the given exit code.

[`case signal(CInt)`](/documentation/Testing/ExitStatus/signal(_:))

The process exited with the given signal.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Copyable`](/documentation/Swift/Copyable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Escapable`](/documentation/Swift/Escapable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)