accept4 actually expect SOCK_NONBLOCK and not O_NONBLOCK

Reported by:	jhb
Pointyhat to:	bapt
This commit is contained in:
Baptiste Daroussin 2016-10-25 15:20:06 +00:00
parent 405804dd31
commit a146e36c02

View File

@ -73,7 +73,7 @@ dbg_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
printf("Waiting for connection from gdb\r\n");
printonce = 1;
}
conn_fd = accept4(listen_fd, NULL, NULL, O_NONBLOCK);
conn_fd = accept4(listen_fd, NULL, NULL, SOCK_NONBLOCK);
if (conn_fd < 0 && errno != EINTR)
perror("accept");
}