Remove old log semantics
This commit is contained in:
parent
3bc8cce90e
commit
f17c13645c
10
log.c
10
log.c
@ -128,13 +128,3 @@ void logStop(int sig)
|
||||
{
|
||||
LOG_I("Server stops due to fatal signal (%d) caught. Exiting", sig);
|
||||
}
|
||||
|
||||
void logRedirectLogFD(int fd)
|
||||
{
|
||||
log_fd = fd;
|
||||
}
|
||||
|
||||
void logDirectlyToFD(const char *msg)
|
||||
{
|
||||
dprintf(log_fd, "%s", msg);
|
||||
}
|
||||
|
2
log.h
2
log.h
@ -56,7 +56,5 @@ bool logInitLogFile(struct nsjconf_t *nsjconf, const char *logfile, bool is_verb
|
||||
void logLog(enum llevel_t ll, const char *fn, int ln, bool perr, const char *fmt, ...)
|
||||
__attribute__ ((format(printf, 5, 6)));
|
||||
void logStop(int sig);
|
||||
void logRedirectLogFD(int fd);
|
||||
void logDirectlyToFD(const char *msg);
|
||||
|
||||
#endif /* NS_LOG_H */
|
||||
|
@ -274,9 +274,5 @@ void subprocRunChild(struct nsjconf_t *nsjconf, int fd_in, int fd_out, int fd_er
|
||||
LOG_I("PID: %d about to execute '%s' for %s", pid, nsjconf->argv[0], cs_addr);
|
||||
|
||||
char log_buf[4096];
|
||||
ssize_t sz;
|
||||
while ((sz = read(sv[1], log_buf, sizeof(log_buf) - 1)) > 0) {
|
||||
log_buf[sz] = '\0';
|
||||
logDirectlyToFD(log_buf);
|
||||
}
|
||||
while (read(sv[1], log_buf, sizeof(log_buf)) > 0 || errno == EINTR) ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user