2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

socket-tcp-skip-in-flight: Use set_nonblock

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
This commit is contained in:
Radostin Stoyanov
2019-02-15 10:27:08 +00:00
committed by Andrei Vagin
parent 635db4895a
commit fd9fb7d339

View File

@@ -30,7 +30,6 @@ int main(int argc, char **argv)
struct pollfd poll_set[1];
int port = 9990;
int fd_s, fd_c, fd;
int flags;
int ret;
test_init(argc, argv);
@@ -39,9 +38,8 @@ int main(int argc, char **argv)
if (fd_s < 0)
return -1;
flags = fcntl(fd_s, F_GETFL, 0);
if (fcntl(fd_s, F_SETFL, flags | O_NONBLOCK)) {
pr_perror("Unable to set O_NONBLOCK");
if (set_nonblock(fd_s, true)) {
pr_perror("setting O_NONBLOCK failed");
return -1;
}