blob: d07e6bcfce323d9dc54ec74be2ec4bb0bb60c605 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001diff --git a/system/core/logwrapper/logwrap.c b/system/core/logwrapper/logwrap.c
2old mode 100644
3new mode 100755
4index ccbe0bf..62b66d0
5--- a/system/core/logwrapper/logwrap.c
6+++ b/system/core/logwrapper/logwrap.c
7@@ -156,9 +156,11 @@ static void add_line_to_circular_buf(struct ending_buf *e_buf,
8
9 /* Log directly to the specified log */
10 static void do_log_line(struct log_info *log_info, char *line) {
11+ #if 0
12 if (log_info->log_target & LOG_KLOG) {
13 klog_write(6, log_info->klog_fmt, line);
14 }
15+ #endif
16 if (log_info->log_target & LOG_ALOG) {
17 ALOG(LOG_INFO, log_info->btag, "%s", line);
18 }
19@@ -349,14 +351,14 @@ static int parent(const char *tag, int parent_read, pid_t pid,
20 log_info.abbreviated = abbreviated;
21
22 while (!found_child) {
23- if (TEMP_FAILURE_RETRY(poll(poll_fds, ARRAY_SIZE(poll_fds), -1)) < 0) {
24+ if ((poll(poll_fds, ARRAY_SIZE(poll_fds), -1)) < 0) {
25 ERROR("poll failed\n");
26 rc = -1;
27 goto err_poll;
28 }
29
30 if (poll_fds[0].revents & POLLIN) {
31- sz = TEMP_FAILURE_RETRY(
32+ sz = (
33 read(parent_read, &buffer[b], sizeof(buffer) - 1 - b));
34
35 for (size_t i = 0; sz > 0 && i < opts_len; ++i) {
36@@ -408,7 +410,7 @@ static int parent(const char *tag, int parent_read, pid_t pid,
37 if (poll_fds[0].revents & POLLHUP) {
38 int ret;
39
40- ret = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0));
41+ ret = (waitpid(pid, &status, 0));
42 if (ret < 0) {
43 rc = errno;
44 ALOG(LOG_ERROR, "logwrap", "waitpid failed with %s\n", strerror(errno));
45@@ -500,7 +502,7 @@ int android_fork_execvp_ext(int argc, char* argv[], int *status, bool ignore_int
46 }
47
48 /* Use ptty instead of socketpair so that STDOUT is not buffered */
49- parent_ptty = TEMP_FAILURE_RETRY(open("/dev/ptmx", O_RDWR));
50+ parent_ptty = (open("/dev/ptmx", O_RDWR));
51 if (parent_ptty < 0) {
52 ERROR("Cannot create parent ptty\n");
53 rc = -1;
54@@ -515,7 +517,7 @@ int android_fork_execvp_ext(int argc, char* argv[], int *status, bool ignore_int
55 goto err_ptty;
56 }
57
58- child_ptty = TEMP_FAILURE_RETRY(open(child_devname, O_RDWR));
59+ child_ptty = (open(child_devname, O_RDWR));
60 if (child_ptty < 0) {
61 ERROR("Cannot open child_ptty\n");
62 rc = -1;
63@@ -526,7 +528,6 @@ int android_fork_execvp_ext(int argc, char* argv[], int *status, bool ignore_int
64 sigaddset(&blockset, SIGINT);
65 sigaddset(&blockset, SIGQUIT);
66 pthread_sigmask(SIG_BLOCK, &blockset, &oldset);
67-
68 pid = fork();
69 if (pid < 0) {
70 close(child_ptty);
71@@ -567,7 +568,7 @@ int android_fork_execvp_ext(int argc, char* argv[], int *status, bool ignore_int
72 const uint8_t* input = opts[i].opt_input.input;
73 while (left > 0) {
74 ssize_t res =
75- TEMP_FAILURE_RETRY(write(parent_ptty, input, left));
76+ (write(parent_ptty, input, left));
77 if (res < 0) {
78 break;
79 }