alloc alloc_str realloc bigalloc mempool mempool-str mempool-fmt eltpool \
partmap hashfunc \
slists simple-lists bitsig \
- log log-stream log-file log-syslog log-conf proctitle tbf \
+ log log-stream log-file log-syslog log-conf tbf \
conf-alloc conf-dump conf-input conf-intr conf-journal conf-parse conf-section \
ipaccess \
fastbuf ff-binary ff-string ff-printf ff-unicode ff-stkstring \
bit-ffs bit-fls \
url \
mainloop main-block main-rec \
- exitstatus runcmd sighandler \
+ proctitle exitstatus runcmd sighandler \
lizard lizard-safe adler32 \
md5 sha1 sha1-hmac \
base64 base224 \
fastbuf.h io.h ff-unicode.h ff-binary.h \
url.h \
mainloop.h \
+ process.h \
lizard.h \
md5.h sha1.h \
base64.h base224.h \
*/
#include "ucw/lib.h"
+#include "ucw/process.h"
#include <stdio.h>
#include <sys/wait.h>
u64 random_u64(void); /** Return a pseudorandom 64-bit number. **/
u64 random_max_u64(u64 max); /** Return a pseudorandom 64-bit number in range [0,@max). **/
-/* proctitle.c */
-
-void setproctitle_init(int argc, char **argv);
-void setproctitle(const char *msg, ...) FORMAT_CHECK(printf,1,2);
-char *getproctitle(void);
-
-/* exitstatus.c */
-
-#define EXIT_STATUS_MSG_SIZE 32
-int format_exit_status(char *msg, int stat);
-
-/* runcmd.c */
-
-int run_command(const char *cmd, ...);
-void NONRET exec_command(const char *cmd, ...);
-void echo_command(char *buf, int size, const char *cmd, ...);
-int run_command_v(const char *cmd, va_list args);
-void NONRET exec_command_v(const char *cmd, va_list args);
-void echo_command_v(char *buf, int size, const char *cmd, va_list args);
-
/* sighandler.c */
typedef int (*ucw_sighandler_t)(int); // gets signum, returns nonzero if abort() should be called
#include "ucw/mainloop.h"
#include "ucw/threads.h"
#include "ucw/gary.h"
+#include "ucw/process.h"
#include <stdio.h>
#include <string.h>
#define _UCW_MAINLOOP_H
#include "ucw/clists.h"
+#include "ucw/process.h"
#include <signal.h>
--- /dev/null
+/*
+ * UCW Library -- Processes
+ *
+ * (c) 2012 Martin Mares <mj@ucw.cz>
+ *
+ * This software may be freely distributed and used according to the terms
+ * of the GNU Lesser General Public License.
+ */
+
+#ifndef _UCW_PROCESS_H
+#define _UCW_PROCESS_H
+
+/* proctitle.c */
+
+void setproctitle_init(int argc, char **argv);
+void setproctitle(const char *msg, ...) FORMAT_CHECK(printf,1,2);
+char *getproctitle(void);
+
+/* exitstatus.c */
+
+#define EXIT_STATUS_MSG_SIZE 32
+int format_exit_status(char *msg, int stat);
+
+/* runcmd.c */
+
+int run_command(const char *cmd, ...);
+void NONRET exec_command(const char *cmd, ...);
+void echo_command(char *buf, int size, const char *cmd, ...);
+int run_command_v(const char *cmd, va_list args);
+void NONRET exec_command_v(const char *cmd, va_list args);
+void echo_command_v(char *buf, int size, const char *cmd, va_list args);
+
+#endif /* !_UCW_PROCESS_H */
*/
#include "ucw/lib.h"
+#include "ucw/process.h"
#include <stdio.h>
#include <string.h>
*/
#include "ucw/lib.h"
+#include "ucw/process.h"
#include <stdlib.h>
#include <string.h>
#include "ucw/clists.h"
#include "ucw/getopt.h"
#include "ucw/conf.h"
+#include "ucw/process.h"
#include <stdio.h>
#include <string.h>