All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
.adef processes

.adef files' processes sections can contain these subsections:

run
envVars
priority
coreFileSize
maxFileSize
memLockSize
numFds
faultAction

run

Names a process to be started by the Supervisor when the app is started. Also specifies executable and command-line arguments.

run: myProc1 ( myExe --foo -b 43 )

Process name and command-line arguments are optional

run: ( myexe )

Executables launched multiple times can appear in multiple “run” sections.

run: ( myexe )
run: ( myexe )

Command-line arguments passed to the process when started can appear after the executable name.

run: ( myexe --foo )
run: ( myexe --bar // Note that the command-line can be broken into multiple
// lines for readability.
--toto ) // And it can be commented too.

Runtime process name is the same as the executable by default. If the process name should be different, add the process name before the opening parenthesis.

run: procA ( myexe2 --foo )
run: procB ( myexe2 --bar )

Executable names can be the ones listed in the app’s “executables:” section, listed in the “import:” section or in Component.cdef “files:” section of an included component.

Quotation marks (either single ' or double ") can be used if white-space (spaces, tabs, //, etc.) is needed inside a command-line argument, or if an empty argument is needed \("").

envVars

Environment variables appear as "name = value" pairs. The first value is the environment variable name; the second part is the variable value. Enclose the value in quotation marks (either single ' or double ") if white-space is required.

envVars:
LE_LOG_LEVEL = DEBUG

priority

Specifies the starting (and maximum) scheduling priority. A running app process can only lower its priority from this point. Once it has lowered its priority, it can't raise it again (e.g., if the process starts at medium priority and reduces to low priority, it can't go back to medium priority). The default is medium.

Values:

  • idle - for very low priority processes that only get CPU time if no other processes are waiting for the CPU.
  • low, medium, high - intended for normal processes that contend for the CPU. Processes with these priorities don't preempt each other, but their priorities affect how they're inserted into the scheduling queue (high to low).
  • rt1 to rt32 - intended for (soft) realtime processes. A higher realtime priority will preempt a lower realtime priority (ie. "rt2" would preempt "rt1"). Processes with any realtime priority will preempt processes with high, medium, low and idle priorities. Processes with these realtime priorities preempt the Legato framework processes. Ensures the design lets realtime processes relinquish the CPU appropriately.
priority: medium

coreFileSize

Specifies the maximum size of core dump files that can be created when processes crash. The K suffix permits specifying in kilobytes (multiples of 1024 bytes). Default is zero.

coreFileSize: 100K

maxFileSize

Specifies the maximum size processes can make files. The K suffix permits specifying in kilobytes (multiples of 1024 bytes). Default is 88K.

maxFileSize: 50K

memLockSize

Specifies the maximum bytes of memory the process can lock into physical RAM (e.g., using mlock() ). Default is 8K.

memLockSize: 32K

numFds

Specifies the maximum number of file descriptors a process can have open at one time. Default is 256.

numFds: 20

faultAction

This subsection specifies the action that the Supervisor should take when the process terminates with a non-zero exit code or because of an un-caught signal (e.g., SIGSEGV, SIGBUS, SIGKILL). Default is ignore.

Possible values are:

  • "ignore" - the Supervisor just logs a warning message but will take no further action.
  • "restart" - log a critical message and then restart the process.
  • "restartApp" - log a critical message and then restart the entire application.
  • "stopApp" - log a critical message then terminate the entire application (send all processes the SIGTERM signal, followed shortly by SIGKILL).
  • "reboot" - log an emergency message and reboot the system.
faultAction: restart

watchdogTimeout

This section specifies the length of the timeout (in milliseconds) for watchdogs called by processes in the enclosing processes section. Once a process has called le_wdog_Kick() it is registered with the software watchdog service and if it then fails to call le_wdog_Kick() within the given timeoutout, the Supervisor will be notified and the Supervisor will take the action specified in watchdogAction.

watchdogAction

This subsection specifies what action the Supervisor should take when a process that has subscribed to the watchdog service fails to kick the watchdog before it expires. The possible values are the same as in faultAction with the addition of:

  • "stop" - the Supervisor terminates the process if it is still running.

If no watchdog action has been supplied then the default action is to restart the process.


Copyright (C) Sierra Wireless, Inc. 2014. All rights reserved. Use of this work is subject to license.