1
/* command.h -- Shared command execution for k4start and k5start. */
2
/* $Id: command.h 3009 2007-03-04 04:42:26Z rra $ */
7
#include <sys/types.h> /* pid_t */
9
/* Run the given aklog command. If verbose is true, print some more output to
10
standard output about the exit status. */
11
void run_aklog(const char *aklog, int verbose);
13
/* Start a command, executing the given command with the given argument vector
14
(which includes argv[0]). Returns the PID or -1 on error. This function
15
should not be called again without an intervening finish_command or the
16
signal handling won't work properly. */
17
pid_t start_command(const char *command, char **argv);
19
/* Check to see if the given command has finished. If so, return 1 and set
20
status to its exit status. If it hasn't, return 0. Return -1 on an
22
int finish_command(pid_t child, int *status);
24
#endif /* COMMAND_H */