---
title: terminationStatus
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/process/terminationstatus
---

# terminationStatus

The exit status the receiver’s executable returns.

## Declaration

```swift
var terminationStatus: Int32 { get }
```

## Return Value

Return Value The exit status returned by the receiver’s executable.

## Discussion

Discussion Each task defines and documents how your app should interpret the return value. For example, many commands return 0 if they complete successfully or an error code if they don’t. You’ll need to look at the documentation for that task to learn what values it returns under what circumstances. This method raises an NSInvalidArgumentException if the receiver is still running. Verify that the receiver isn’t running before you use it.

## See Also

### Related Documentation

- [waitUntilExit()](foundation/process/waituntilexit().md)
- [terminate()](foundation/process/terminate().md)

### Querying the process state

- [isRunning](foundation/process/isrunning.md)
- [terminationReason](foundation/process/terminationreason-swift.property.md)
