Skip to content

Commit ce4a66f

Browse files
committed
input_thread: use flb_pipe_r in handle_input_event to fix crash on read error
Signed-off-by: zshuang0316 <zshuang0316@163.com>
1 parent 32a3cbb commit ce4a66f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/flb_input_thread.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ static inline int handle_input_event(flb_pipefd_t fd, struct flb_input_instance
5959
uint64_t val;
6060
struct flb_config *config = ins->config;
6161

62-
bytes = read(fd, &val, sizeof(val));
62+
bytes = flb_pipe_r(fd, &val, sizeof(val));
6363
if (bytes == -1) {
64-
flb_errno();
64+
flb_pipe_error();
6565
return -1;
6666
}
6767

0 commit comments

Comments
 (0)