mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-14 02:22:03 +08:00
added set_non_block()
This commit is contained in:
+1
-10
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user