evas cserv2 - fix fcntl return check

fixes CID 1039704
This commit is contained in:
Carsten Haitzler 2014-08-27 15:09:14 +09:00
parent 03941beeed
commit dab0558843
1 changed files with 2 additions and 2 deletions

View File

@ -568,11 +568,11 @@ cserve2_slave_thread_run(Slave_Thread_Cb thread_cb, void *thread_data, Slave_Rea
sb->write_fd = child[1];
flags = fcntl(sb->write_fd, F_GETFL);
flags |= O_NONBLOCK;
fcntl(sb->write_fd, F_SETFL, flags);
if (fcntl(sb->write_fd, F_SETFL, flags) < 0) ERR("fcntl NONBLOCK failed");
sb->read_fd = parent[0];
flags = fcntl(sb->read_fd, F_GETFL);
flags |= O_NONBLOCK;
fcntl(sb->read_fd, F_SETFL, flags);
if (fcntl(sb->read_fd, F_SETFL, flags) < 0) ERR("fcntl NONBLOCK failed");
sb->read_cb = read_cb;
sb->dead_cb = dead_cb;
sb->data = data;