How work Supervisor

Hello .
i read legato framework 18.06 file supervisor.c
I see code
// All the framework daemons are active now. Now set the reboot expiry timer if it is not a
// RO system.
if (!isReadOnly)
LE_INFO(“Not a read-only system. Configuring boot expire timer.”);
// If we have a writable system, create and start the quick-reboot timer.
RebootTimer = le_timer_Create(“Reboot”);
le_timer_SetHandler(RebootTimer, HandleRebootExpiry);

le_timer_SetMsInterval(RebootTimer, GetBootExpirePeriod());
le_timer_SetWakeup(RebootTimer, false);


1) But what causes HandleRebootExpiry() ?
Under what circumstances will be called HandleRebootExpiry() ?

static size_t GetBootExpirePeriod
int period;

// Read the user defined timeout from config tree
le_cfg_IteratorRef_t iterRef = le_cfg_CreateReadTxn(BOOT_CFG_PATH);
period = le_cfg_GetInt(iterRef, BOOT_TIMEOUT_PATH, DEFAULT_BOOT_PERIOD);

LE_INFO("Boot timeout period = %d ms (~%d seconds)", period, period/1000);

return (size_t)period;

2) How to change the timeout value in the system?

Hi zuuuuk,

Below my understanding

  1. This used to monitor does system boot correctly and stable for certain time (specified by BOOT_CFG_PATH, BOOT_TIMEOUT_PATH).
    So, system run normally (without reboot) will cause the timer expire and called the HandleRebootExpiry().

  2. We can use Config Tree API to specify your desired timeout value or use target tool “config”.
    Config Tree - Legato Docs

Hope it helps.