added set_non_block()

This commit is contained in:
Nikos Mavrogiannopoulos
2014-10-05 22:00:53 +02:00
parent 5a32ad3f3f
commit db48e3db07
3 changed files with 12 additions and 10 deletions
+1 -10
View File
@@ -122,16 +122,7 @@ int y;
static void set_common_socket_options(int fd)
{
int val;
val = fcntl(fd, F_GETFL, 0);
if ((val == -1)
|| (fcntl(fd, F_SETFL, val | O_NONBLOCK) < 0)) {
int e = errno;
fprintf(stderr, "fcntl() error: %s", strerror(e));
exit(1);
}
set_non_block(fd);
set_cloexec_flag (fd, 1);
}