Enter supervisor mode when requested, otherwise return immediately.
If auto-restart is enabled and the current process is not marked as a
child (--watch-child), this routine runs a supervisor loop and does not
return.
subroutine maybe_supervise() logical :: auto_restart, is_child real :: restart_delay integer :: restart_max character(len=:), allocatable :: self_exe call parse_restart_flags(auto_restart, restart_delay, restart_max, is_child, self_exe) if (auto_restart .and. (.not. is_child)) then call supervisor_loop(max(0.0, restart_delay), restart_max, self_exe) stop 0 end if end subroutine maybe_supervise