Loading logwrapper/logwrap.c +23 −20 Original line number Diff line number Diff line Loading @@ -144,22 +144,26 @@ static int parent(const char *tag, int parent_read, int signal_fd, pid_t pid, } } if (chld_sts != NULL) { *chld_sts = status; } else { if (WIFEXITED(status)) rc = WEXITSTATUS(status); else rc = -ECHILD; } if (logwrap) { // Flush remaining data if (a != b) { buffer[b] = '\0'; if (logwrap) ALOG(LOG_INFO, btag, "%s", &buffer[a]); } if (WIFEXITED(status)) { if (WEXITSTATUS(status)) ALOG(LOG_INFO, "logwrapper", "%s terminated by exit(%d)", btag, WEXITSTATUS(status)); if (chld_sts == NULL) rc = WEXITSTATUS(status); } else { if (chld_sts == NULL) rc = -ECHILD; if (WIFSIGNALED(status)) ALOG(LOG_INFO, "logwrapper", "%s terminated by signal %d", btag, WTERMSIG(status)); Loading @@ -167,8 +171,7 @@ static int parent(const char *tag, int parent_read, int signal_fd, pid_t pid, ALOG(LOG_INFO, "logwrapper", "%s stopped by signal %d", btag, WSTOPSIG(status)); } if (chld_sts != NULL) *chld_sts = status; } err_poll: return rc; Loading Loading
logwrapper/logwrap.c +23 −20 Original line number Diff line number Diff line Loading @@ -144,22 +144,26 @@ static int parent(const char *tag, int parent_read, int signal_fd, pid_t pid, } } if (chld_sts != NULL) { *chld_sts = status; } else { if (WIFEXITED(status)) rc = WEXITSTATUS(status); else rc = -ECHILD; } if (logwrap) { // Flush remaining data if (a != b) { buffer[b] = '\0'; if (logwrap) ALOG(LOG_INFO, btag, "%s", &buffer[a]); } if (WIFEXITED(status)) { if (WEXITSTATUS(status)) ALOG(LOG_INFO, "logwrapper", "%s terminated by exit(%d)", btag, WEXITSTATUS(status)); if (chld_sts == NULL) rc = WEXITSTATUS(status); } else { if (chld_sts == NULL) rc = -ECHILD; if (WIFSIGNALED(status)) ALOG(LOG_INFO, "logwrapper", "%s terminated by signal %d", btag, WTERMSIG(status)); Loading @@ -167,8 +171,7 @@ static int parent(const char *tag, int parent_read, int signal_fd, pid_t pid, ALOG(LOG_INFO, "logwrapper", "%s stopped by signal %d", btag, WSTOPSIG(status)); } if (chld_sts != NULL) *chld_sts = status; } err_poll: return rc; Loading