Loading liblog/event_tag_map.c +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ LIBLOG_ABI_PUBLIC EventTagMap* android_openEventTagMap(const char* fileName) if (newTagMap == NULL) return NULL; fd = open(fileName, O_RDONLY); fd = open(fileName, O_RDONLY | O_CLOEXEC); if (fd < 0) { fprintf(stderr, "%s: unable to open map '%s': %s\n", OUT_TAG, fileName, strerror(errno)); Loading liblog/logprint.c +1 −1 Original line number Diff line number Diff line Loading @@ -1042,7 +1042,7 @@ static void convertMonotonic(struct timespec *result, * Anything in the Android Logger before the dmesg logging span will * be highly suspect regarding the monotonic time calculations. */ FILE *p = popen("/system/bin/dmesg", "r"); FILE *p = popen("/system/bin/dmesg", "re"); if (p) { char *line = NULL; size_t len = 0; Loading liblog/pmsg_reader.c +2 −2 Original line number Diff line number Diff line Loading @@ -151,13 +151,13 @@ static int pmsgRead(struct android_log_logger_list *logger_list, memset(log_msg, 0, sizeof(*log_msg)); if (transp->context.fd <= 0) { int fd = open("/sys/fs/pstore/pmsg-ramoops-0", O_RDONLY); int fd = open("/sys/fs/pstore/pmsg-ramoops-0", O_RDONLY | O_CLOEXEC); if (fd < 0) { return -errno; } if (fd == 0) { /* Argggg */ fd = open("/sys/fs/pstore/pmsg-ramoops-0", O_RDONLY); fd = open("/sys/fs/pstore/pmsg-ramoops-0", O_RDONLY | O_CLOEXEC); close(0); if (fd < 0) { return -errno; Loading liblog/pmsg_writer.c +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ LIBLOG_HIDDEN struct android_log_transport_write pmsgLoggerWrite = { static int pmsgOpen() { if (pmsgLoggerWrite.context.fd < 0) { pmsgLoggerWrite.context.fd = TEMP_FAILURE_RETRY(open("/dev/pmsg0", O_WRONLY)); pmsgLoggerWrite.context.fd = TEMP_FAILURE_RETRY(open("/dev/pmsg0", O_WRONLY | O_CLOEXEC)); } return pmsgLoggerWrite.context.fd; Loading Loading
liblog/event_tag_map.c +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ LIBLOG_ABI_PUBLIC EventTagMap* android_openEventTagMap(const char* fileName) if (newTagMap == NULL) return NULL; fd = open(fileName, O_RDONLY); fd = open(fileName, O_RDONLY | O_CLOEXEC); if (fd < 0) { fprintf(stderr, "%s: unable to open map '%s': %s\n", OUT_TAG, fileName, strerror(errno)); Loading
liblog/logprint.c +1 −1 Original line number Diff line number Diff line Loading @@ -1042,7 +1042,7 @@ static void convertMonotonic(struct timespec *result, * Anything in the Android Logger before the dmesg logging span will * be highly suspect regarding the monotonic time calculations. */ FILE *p = popen("/system/bin/dmesg", "r"); FILE *p = popen("/system/bin/dmesg", "re"); if (p) { char *line = NULL; size_t len = 0; Loading
liblog/pmsg_reader.c +2 −2 Original line number Diff line number Diff line Loading @@ -151,13 +151,13 @@ static int pmsgRead(struct android_log_logger_list *logger_list, memset(log_msg, 0, sizeof(*log_msg)); if (transp->context.fd <= 0) { int fd = open("/sys/fs/pstore/pmsg-ramoops-0", O_RDONLY); int fd = open("/sys/fs/pstore/pmsg-ramoops-0", O_RDONLY | O_CLOEXEC); if (fd < 0) { return -errno; } if (fd == 0) { /* Argggg */ fd = open("/sys/fs/pstore/pmsg-ramoops-0", O_RDONLY); fd = open("/sys/fs/pstore/pmsg-ramoops-0", O_RDONLY | O_CLOEXEC); close(0); if (fd < 0) { return -errno; Loading
liblog/pmsg_writer.c +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ LIBLOG_HIDDEN struct android_log_transport_write pmsgLoggerWrite = { static int pmsgOpen() { if (pmsgLoggerWrite.context.fd < 0) { pmsgLoggerWrite.context.fd = TEMP_FAILURE_RETRY(open("/dev/pmsg0", O_WRONLY)); pmsgLoggerWrite.context.fd = TEMP_FAILURE_RETRY(open("/dev/pmsg0", O_WRONLY | O_CLOEXEC)); } return pmsgLoggerWrite.context.fd; Loading