]> mj.ucw.cz Git - libucw.git/blob - ucw/process.h
Merge branch 'dev-trans'
[libucw.git] / ucw / process.h
1 /*
2  *      UCW Library -- Processes
3  *
4  *      (c) 2012 Martin Mares <mj@ucw.cz>
5  *
6  *      This software may be freely distributed and used according to the terms
7  *      of the GNU Lesser General Public License.
8  */
9
10 #ifndef _UCW_PROCESS_H
11 #define _UCW_PROCESS_H
12
13 /* proctitle.c */
14
15 void setproctitle_init(int argc, char **argv);
16 void setproctitle(const char *msg, ...) FORMAT_CHECK(printf,1,2);
17 char *getproctitle(void);
18
19 /* exitstatus.c */
20
21 #define EXIT_STATUS_MSG_SIZE 32
22 int format_exit_status(char *msg, int stat);
23
24 /* runcmd.c */
25
26 int run_command(const char *cmd, ...);
27 void NONRET exec_command(const char *cmd, ...);
28 void echo_command(char *buf, int size, const char *cmd, ...);
29 int run_command_v(const char *cmd, va_list args);
30 void NONRET exec_command_v(const char *cmd, va_list args);
31 void echo_command_v(char *buf, int size, const char *cmd, va_list args);
32
33 #endif  /* !_UCW_PROCESS_H */