aboutsummaryrefslogtreecommitdiffstats
path: root/echld/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'echld/common.c')
-rw-r--r--echld/common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/echld/common.c b/echld/common.c
index c298d2c49c..564a48e29e 100644
--- a/echld/common.c
+++ b/echld/common.c
@@ -187,7 +187,10 @@ static void parent_realloc_buff(echld_reader_t* b, size_t needed) {
void echld_reset_reader(echld_reader_t* r, int fd, size_t initial) {
r->fd = fd;
- fcntl(fd, F_SETFL, O_NONBLOCK);
+ if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
+ fprintf(stderr, "Unable to set non blocking on file...\n");
+ return;
+ }
if (r->data == NULL) {
r->actual_len = initial;