# MosProcessExecuteResult

The MosProcessExecuteResult object contains fields representing the result of running an external program.

### Fields <a href="#h.o1rfpn6or86b" id="h.o1rfpn6or86b"></a>

| **Name**  | **Description**                                                                                                                                    |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| hasExited | Indicates completion of program execution or exceeding the waiting time. *True* – the program is complete, *False* – the waiting time is exceeded. |
| exitCode  | Contains the program exit code. Note that if the time of waiting for program execution was exceeded, exitCode will be -1.                          |
| output    | Contains the standard output of the program if it has been completed.                                                                              |

### Examples <a href="#h.8lais511tq7u" id="h.8lais511tq7u"></a>

The following example shows an expression that returns the hostname of the host where the server is deployed using the standard output of the hostname command:

```javascript
var result = MosProcess.runAndWait('hostname', '', 5000);
return result.output;
```
