run_once Subroutine

private subroutine run_once(self, cmd0)

Run the configured command once without change detection.

Used for the optional "run on start" behavior.

Arguments

Type IntentOptional Attributes Name
class(watcher_t), intent(inout) :: self
character(len=*), intent(in) :: cmd0

Calls

proc~~run_once~~CallsGraph proc~run_once run_once proc~on_after_run_all feature_manager_t%on_after_run_all proc~run_once->proc~on_after_run_all proc~on_before_run_all feature_manager_t%on_before_run_all proc~run_once->proc~on_before_run_all proc~run_command_and_report run_command_and_report proc~run_once->proc~run_command_and_report proc~feat_after_noop watch_feature_t%feat_after_noop proc~on_after_run_all->proc~feat_after_noop proc~feat_before_noop watch_feature_t%feat_before_noop proc~on_before_run_all->proc~feat_before_noop colorize colorize proc~run_command_and_report->colorize proc~ftoa ftoa proc~run_command_and_report->proc~ftoa run run proc~run_command_and_report->run str str proc~run_command_and_report->str

Called by

proc~~run_once~~CalledByGraph proc~run_once run_once proc~watcher_init watcher_t%watcher_init proc~watcher_init->proc~run_once

Source Code

   subroutine run_once(self, cmd0)
      class(watcher_t), intent(inout) :: self
      character(len=*), intent(in) :: cmd0
      character(len=:), allocatable :: cmd
      integer :: exitstat
      real :: secs
      cmd = trim(cmd0)
      call self%fm%on_before_run_all(cmd)
      call run_command_and_report(cmd, self%cfg%w, exitstat, secs)
      call self%fm%on_after_run_all(exitstat, secs)
   end subroutine run_once