Also log date and time
[notion/jeffpc.git] / libmainloop / exec.h
blob6dbfd7eb265099f9cd330b15157213d4cb5cb3d6
1 /*
2 * ion/libmainloop/exec.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #ifndef ION_LIBMAINLOOP_EXEC_H
10 #define ION_LIBMAINLOOP_EXEC_H
12 #include <sys/types.h>
13 #include <unistd.h>
15 #include <libextl/extl.h>
17 extern void mainloop_do_exec(const char *cmd);
18 extern pid_t mainloop_fork(void (*fn)(void *p), void *p,
19 int *infd, int *outfd, int *errfd);
20 extern pid_t mainloop_do_spawn(const char *cmd,
21 void (*initenv)(void *p), void *p,
22 int *infd, int *outfd, int *errfd);
23 extern pid_t mainloop_spawn(const char *cmd);
25 extern pid_t mainloop_popen_bgread(const char *cmd,
26 void (*initenv)(void *p), void *p,
27 ExtlFn handler, ExtlFn errhandler);
29 extern bool mainloop_register_input_fd_extlfn(int fd, ExtlFn fn);
30 extern bool mainloop_process_pipe_extlfn(int fd, ExtlFn fn);
32 extern void cloexec_braindamage_fix(int fd);
34 #endif /* ION_LIBMAINLOOP_EXEC_H */