va_end(al);
}
+void lg_exitstatus(struct log_if *lg, const char *desc, struct cloc *loc,
+ int class, int status, const char *progname)
+{
+ if (!status)
+ lg_perror(lg,desc,loc,class,0,"%s exited",progname);
+ else if (WIFEXITED(status))
+ lg_perror(lg,desc,loc,class,0,"%s exited with error exit status %d",
+ progname,WEXITSTATUS(status));
+ else if (WIFSIGNALED(status))
+ lg_perror(lg,desc,loc,class,0,"%s died due to fatal signal %s (%d)%s",
+ progname,strsignal(WTERMSIG(status)),WTERMSIG(status),
+ WCOREDUMP(status)?" (core dumped)":"");
+ else
+ lg_perror(lg,desc,loc,class,0,"%s died with unknown wait status %d",
+ progname,status);
+}
+
struct log_if *init_log(list_t *ll)
{
int i=0;
i=-1;
}
}
+ } else if (errno==EINTR || iswouldblock(errno)) {
} else {
Message(M_WARNING,"log_from_fd: %s\n",strerror(errno));
st->finished=True;
st->i=0;
st->finished=False;
+ setnonblock(st->fd);
+
register_for_poll(st,log_from_fd_beforepoll,log_from_fd_afterpoll,
prefix);
}