Lines Matching refs:command
639 void format_args(const char* command, const char *args[], std::string *string);
641 int run_command(const char *title, int timeout_seconds, const char *command, ...) { in run_command() argument
645 const char *args[1024] = {command}; in run_command()
648 va_start(ap, command); in run_command()
649 if (title) printf("------ %s (%s", title, command); in run_command()
666 format_args(command, args, &cmd); in run_command()
678 int run_command_as_shell(const char *title, int timeout_seconds, const char *command, ...) { in run_command_as_shell() argument
682 const char *args[1024] = {command}; in run_command_as_shell()
685 va_start(ap, command); in run_command_as_shell()
686 if (title) printf("------ %s (%s", title, command); in run_command_as_shell()
703 format_args(command, args, &cmd); in run_command_as_shell()
726 const char *command = args[0]; in run_command_always() local
740 if (!silent) printf("*** fail todrop root before running %s: %s\n", command, in run_command_always()
742 MYLOGE("*** could not drop root before running %s: %s\n", command, strerror(errno)); in run_command_always()
760 execvp(command, (char**) args); in run_command_always()
763 MYLOGD("execvp on command '%s' failed (error: %s)", command, strerror(errno)); in run_command_always()
776 format_args(command, args, &cmd); in run_command_always()
782 format_args(command, args, &cmd); in run_command_always()
793 command, pid); in run_command_always()
794 MYLOGE("could not kill command '%s' (pid %d) even with SIGKILL.\n", command, pid); in run_command_always()
799 format_args(command, args, &cmd); in run_command_always()
806 if (!silent) printf("*** %s: Killed by signal %d\n", command, WTERMSIG(status)); in run_command_always()
807 MYLOGE("*** %s: Killed by signal %d\n", command, WTERMSIG(status)); in run_command_always()
809 if (!silent) printf("*** %s: Exit code %d\n", command, WEXITSTATUS(status)); in run_command_always()
810 MYLOGE("*** %s: Exit code %d\n", command, WEXITSTATUS(status)); in run_command_always()
1380 void format_args(const char* command, const char *args[], std::string *string) { in format_args() argument
1381 LOG_ALWAYS_FATAL_IF(args == nullptr || command == nullptr); in format_args()
1382 string->append(command); in format_args()