Supervisor and auto-restart support.
When enabled, fpm-watch can run under a supervisor loop that restarts the
watcher on failure (non-zero exit status).
Configuration sources:
- CLI flags:
- --watch-auto-restart
- --watch-restart-delay <sec>
- --watch-restart-max <n>
- --watch-self <path>
- fpm.toml [extra.fpm-watch] keys:
- auto-restart, restart-delay, restart-max, self / self-exe
Low CPU mode is also applied here so the supervisor delay sleeps are idle.
module~~watch_restart~~UsesGraph
module~watch_restart
watch_restart
iso_fortran_env
iso_fortran_env
module~watch_restart->iso_fortran_env
module~watch_cmdline
watch_cmdline
module~watch_restart->module~watch_cmdline
module~watch_config
watch_config
module~watch_restart->module~watch_config
module~watch_time
watch_time
module~watch_restart->module~watch_time
fpm_environment
fpm_environment
module~watch_cmdline->fpm_environment
fpm_error
fpm_error
module~watch_config->fpm_error
fpm_filesystem
fpm_filesystem
module~watch_config->fpm_filesystem
fpm_strings
fpm_strings
module~watch_config->fpm_strings
fpm_toml
fpm_toml
module~watch_config->fpm_toml
module~watch_types
watch_types
module~watch_config->module~watch_types
tomlf
tomlf
module~watch_config->tomlf
module~watch_time->iso_fortran_env
module~watch_time->fpm_environment
iso_c_binding
iso_c_binding
module~watch_time->iso_c_binding
module~watch_types->iso_fortran_env
module~watch_types->fpm_strings
fpm_command_line
fpm_command_line
module~watch_types->fpm_command_line
Nodes of different colours represent the following:
Graph Key
Module
Module
Submodule
Submodule
Subroutine
Subroutine
Function
Function
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Functions
Build the command line used to spawn the supervised child.
Read more…
Arguments
Type
Intent Optional Attributes
Name
character(len=*),
intent(in)
::
exe0
Return Value
character(len=:), allocatable
Determine the executable to use when spawning the child watcher.
Read more…
Arguments
Type
Intent Optional Attributes
Name
character(len=*),
intent(in)
::
exe0
Return Value
character(len=:), allocatable
Subroutines
Enter supervisor mode when requested, otherwise return immediately.
Read more…
Arguments
None
Parse restart-related flags and apply manifest defaults.
Read more…
Arguments
Type
Intent Optional Attributes
Name
logical,
intent(out)
::
auto_restart
real,
intent(out)
::
restart_delay
integer,
intent(out)
::
restart_max
logical,
intent(out)
::
is_child
character(len=:),
intent(out),
allocatable
::
self_exe
Run the supervisor loop, restarting the child on non-zero exit.
Read more…
Arguments
Type
Intent Optional Attributes
Name
real,
intent(in)
::
delay0
integer,
intent(in)
::
max0
character(len=*),
intent(in)
::
exe0