diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-16 00:42:29 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-16 00:42:29 +0200 |
commit | b314737e9a0f0df710ba5e8691882cd7d42faaf5 (patch) | |
tree | 39e8cae5647d9323b8d9c01201fce18466a2fc3d /netifd.h | |
parent | 6b3f6f4466e5584f2bdefc55b3ca34186b65acb9 (diff) |
detach stdin/stdout/stderr from child processes, implement a separate logging pipe and relay log messages with prefix
Diffstat (limited to 'netifd.h')
-rw-r--r-- | netifd.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -44,6 +44,8 @@ enum { #define D(level, format, ...) no_debug(DEBUG_ ## level, format, ## __VA_ARGS__) #endif +#define LOG_BUF_SIZE 256 + static inline void no_debug(int level, const char *fmt, ...) { } @@ -59,6 +61,13 @@ struct netifd_process { struct uloop_process uloop; void (*cb)(struct netifd_process *, int ret); int dir_fd; + + struct netifd_fd log_fd; + struct uloop_fd log_uloop; + const char *log_prefix; + char *log_buf; + int log_buf_ofs; + bool log_overflow; }; int netifd_start_process(const char **argv, char **env, struct netifd_process *proc); |