_______________________ _____________________ | _________________| |_________________ | | | | AMICO_link exchange messages | | | | | | <----------------------------> | CarLinO_leash | | | | CarLinO_process | |_________________| | | | | <----. | | | |_________________| | | | | | | | CarLinO Application | | CarLinO_core | | | | | | | Add process in list | | | | | | CarLinO Wrapper | | ___________________| | | + | | | | | | Linux application | | | CarLinO_init | | |_____________________| | | | | /|\ | | | -----' | | | | | | | | fork / respawn | | | | ------------------------------------------| | | | | | | | _____\|/_____ | | | <----- /etc/carlino.conf | | | |___________________| /etc/carlino.d/* | module |------. | | |_____________| | |_______________________| | ________________________________________________________________________________\|/_____ | | | Kernel | |________________________________________________________________________________________|
/|\ | | | CarLinO_init ____|_______________|________________________________________________________________________________________________ | | APProcess | _______|_______ | | | (child) | | Fork |-----------.---------------------------------------------> 1. run 'prepare' script | |_______________| | | 2. load 'drivers' | | (parent) | | | | | | |_______________| | mode FORK / RESPAWN | mode NORMAL _______\|/_______ _______\|/_______ | |(child) | | .----------------->| Fork |-------------------->| Execute Process | exit 0 | |_________________| | |_________________| _________ | | (parent) | . /|\ | | | . | | mode FORK | mode RESPAWN \|/ . | | _____________|_____________ run 'start' script . | | | | . | | No ____\|/___ | . ___|_______|___ exit 0 ________\|/________ . | | | | . | Check if stop | | Waiting for child | . . . . . . . . | | | dead | |_______________| |___________________| | | | |----------> run 'stop' script |_____________________________________________|