def run_bg(cmd, pid: nil, log: '/dev/null')
      cmd = @before_run_block.call(cmd) if @before_run_block
      return false unless cmd
      full_cmd = "exec #{cmd} >#{log} 2>&1"
      say "!txtgrn!> #{full_cmd}" unless Runfile.quiet
      process = IO.popen "exec #{cmd} >#{log} 2>&1"
      File.write pidfile(pid), process.pid if pid
      @after_run_block.call(cmd) if @after_run_block
      return process.pid
    end
def run_bg(cmd, pid: nil, log: '/dev/null')
      cmd = @before_run_block.call(cmd) if @before_run_block
      return false unless cmd
      full_cmd = "exec #{cmd} >#{log} 2>&1"
      say "!txtgrn!> #{full_cmd}" unless Runfile.quiet
      process = IO.popen "exec #{cmd} >#{log} 2>&1"
      File.write pidfile(pid), process.pid if pid
      @after_run_block.call(cmd) if @after_run_block
      return process.pid
    end
Run a command in the background, optionally log to a log file and save
 the process ID in a pid file