2 * UCW Library -- Processes
4 * (c) 2012 Martin Mares <mj@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
10 #ifndef _UCW_PROCESS_H
11 #define _UCW_PROCESS_H
13 #ifdef CONFIG_UCW_CLEAN_ABI
14 #define echo_command ucw_echo_command
15 #define echo_command_v ucw_echo_command_v
16 #define exec_command ucw_exec_command
17 #define exec_command_v ucw_exec_command_v
18 #define format_exit_status ucw_format_exit_status
19 #define getproctitle ucw_getproctitle
20 #define run_command ucw_run_command
21 #define run_command_v ucw_run_command_v
22 #define setproctitle ucw_setproctitle
23 #define setproctitle_init ucw_setproctitle_init
28 // Must be called before parsing of arguments
29 void setproctitle_init(int argc, char **argv);
30 void setproctitle(const char *msg, ...) FORMAT_CHECK(printf,1,2);
31 char *getproctitle(void);
35 #define EXIT_STATUS_MSG_SIZE 64
36 int format_exit_status(char *msg, int stat);
40 int run_command(const char *cmd, ...);
41 void NONRET exec_command(const char *cmd, ...);
42 void echo_command(char *buf, int size, const char *cmd, ...);
43 int run_command_v(const char *cmd, va_list args);
44 void NONRET exec_command_v(const char *cmd, va_list args);
45 void echo_command_v(char *buf, int size, const char *cmd, va_list args);
47 #endif /* !_UCW_PROCESS_H */