Shell.TerminationReason
-----------------------

Returns the reason the task was terminated.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Shell](component_Shell.md) | [7.5](newinversion75.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |

MBS( "Shell.TerminationReason"; ShellRef ) 

**MBS**( **"Shell.TerminationReason";** /\* Returns the reason the task was terminated. \*/  
**$ShellRef**) /\* The reference number from the shell.e.g. $shell \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ShellRef | The reference number from the shell. | $shell |

### Result

Returns the reason the task was terminated.

### Description

Returns the reason the task was terminated.  
Available in OS X v10.6 and later.  
Returns 1 for exit and 2 for an uncaught signal.  
This function checks for a license.

Created 11st November 2017 , last changed 11st November 2017

  
[Shell.Terminate](ShellTerminate.md) - [Shell.Wait](ShellWait.md)

[HTML Version](ShellTerminationReason.shtml)