... | ... | @@ -219,13 +219,23 @@ You can display the version of the server: |
|
|
$ cmo version
|
|
|
```
|
|
|
|
|
|
# Pass arguments
|
|
|
|
|
|
It is possible to pass arguments to a *start* request. With the console it is naturally done:
|
|
|
```
|
|
|
$ cmo start App2 -debug true -timeout 10
|
|
|
```
|
|
|
This example shows that the arguments *-debug true -timeout 10* will be passed to the executable. It can also be done with the APIs. In C++:
|
|
|
```cpp
|
|
|
server.start("App2", {"-debug", "true", "-timeout", "10"});
|
|
|
```
|
|
|
|
|
|
# Exit code
|
|
|
|
|
|
Sometimes we need to get the exit code of an app. It is possible to do it with the API as well as with the console. The APIs provide the *getExitCode()* function or method of the *Instance* class.
|
|
|
We suppose to have an *App4* application that returns after a certain amount of time.
|
|
|
|
|
|
For example in C++:
|
|
|
|
|
|
```cpp
|
|
|
// Connect the application "App4" and obtain a reference to the running app.
|
|
|
std::unique_ptr<cameo::application::Instance> app4 = server.connect("App4");
|
... | ... | |