... | ... | @@ -21,7 +21,7 @@ Let's take an example with two applications registered: |
|
|
<application name="App2">
|
|
|
<start executable="/users/ics/app2"/>
|
|
|
<stop executable="kill" args="-2 $PID"/>
|
|
|
<error executable="/users/ics/error.sh"/>
|
|
|
<error executable="/users/ics/error.sh" args="-debug"/>
|
|
|
</application>
|
|
|
<applications>
|
|
|
</config>
|
... | ... | @@ -195,4 +195,21 @@ The implementation of a Cameo server is based on ZeroMQ and a sockets of differe |
|
|
* The stream ports: Each application for which the attribute *stream* is set to *yes* publishes the standard error and output on a stream port.
|
|
|
* The coms ports: We will see later that the provided coms also use some ports for their implementation.
|
|
|
|
|
|
Except the base port that is fixed, all the other ports are **dynamically assigned**. Right now the Cameo server does not check if the port it assigns has already been assigned by an external program, however it is planned to be. |
|
|
\ No newline at end of file |
|
|
Except the base port that is fixed, all the other ports are **dynamically assigned**. Right now the Cameo server does not check if the port it assigns has already been assigned by an external program, however it is planned to be.
|
|
|
|
|
|
# Stop and error executables
|
|
|
|
|
|
If you need to define a stop executable then you can send a signal to the process of the application. For instance:
|
|
|
```xml
|
|
|
<stop executable="kill" args="-2 $PID"/>
|
|
|
```
|
|
|
The variable *$PID* will be replaced by the PID of the running application. However this is the only available variable.
|
|
|
|
|
|
If you need to define an error executable, you can for instance define:
|
|
|
```xml
|
|
|
<error executable="/users/ics/error.sh" args="-debug"/>
|
|
|
```
|
|
|
If the running application terminates with an error the following arguments will be added to the command executed: *id*, *error code*, *current state*. For instance:
|
|
|
```
|
|
|
$ /users/ics/error.sh -debug 13 121 RUNNING
|
|
|
``` |