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
15 // Must be called before parsing of arguments
16 void setproctitle_init(int argc, char **argv);
17 void setproctitle(const char *msg, ...) FORMAT_CHECK(printf,1,2);
18 char *getproctitle(void);
22 #define EXIT_STATUS_MSG_SIZE 64
23 int format_exit_status(char *msg, int stat);
27 int run_command(const char *cmd, ...);
28 void NONRET exec_command(const char *cmd, ...);
29 void echo_command(char *buf, int size, const char *cmd, ...);
30 int run_command_v(const char *cmd, va_list args);
31 void NONRET exec_command_v(const char *cmd, va_list args);
32 void echo_command_v(char *buf, int size, const char *cmd, va_list args);
34 #endif /* !_UCW_PROCESS_H */