Skip to content

Commit e8f1d81

Browse files
authored
core: flb_scheduler fix for macOS (#2463)
src/flb_scheduler.c: cosumer_bytes() gives errors in macOS (10.13,... ?). function flb_pipe_r can return value 0 if is considered as error. This patch allows return value zero. Signed-off-by: Jukka Pihl <[email protected]>
1 parent 29ac8f1 commit e8f1d81

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/flb_scheduler.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ static inline int consume_byte(flb_pipefd_t fd)
4444

4545
/* We need to consume the byte */
4646
ret = flb_pipe_r(fd, &val, sizeof(val));
47+
#ifdef __APPLE__
48+
if (ret < 0) {
49+
#else
4750
if (ret <= 0) {
51+
#endif
4852
flb_errno();
4953
return -1;
5054
}

0 commit comments

Comments
 (0)