You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB

#error Please include <lighttpd/angel_base.h> instead of this file
/* The callback is not allowed to close the epipe */
typedef void (*liErrorPipeCB)(liServer *srv, liErrorPipe *epipe, GString *msg);
typedef void (*liProcSetupCB)(gpointer ctx);
struct liErrorPipe {
liServer *srv;
gpointer ctx;
liErrorPipeCB cb;
int fds[2];
ev_io fd_watcher;
struct liProc {
liServer *srv;
pid_t child_pid;
liErrorPipe *epipe;
gchar *appname;
LI_API liErrorPipe* li_error_pipe_new(liServer *srv, liErrorPipeCB cb, gpointer ctx);
LI_API void li_error_pipe_free(liErrorPipe *epipe);
/** closes out-fd */
LI_API void li_error_pipe_activate(liErrorPipe *epipe);
/** closes in-fd, moves out-fd to dest_fd */
LI_API void li_error_pipe_use(liErrorPipe *epipe, int dest_fd);
/** read remaining data from in-fd */
LI_API void li_error_pipe_flush(liErrorPipe *epipe);
LI_API liProc* li_proc_new(liServer *srv, gchar **args, gchar **env, uid_t uid, gid_t gid, gchar *username, liProcSetupCB cb, gpointer ctx);
LI_API void li_proc_free(liProc *proc);