<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Process/terminationReason-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTask(py)terminationReason"
  },
  "title" : "terminationReason"
}
-->

# terminationReason

The reason the system terminated the task.

```
var terminationReason: Process.TerminationReason { get }
```

## Return Value

The termination status. The possible values are described in [`Process.TerminationReason`](/documentation/Foundation/Process/TerminationReason-swift.enum).

## Discussion

---

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)