check accept() return value

This commit is contained in:
Yves Rutschle 2023-05-13 23:00:26 +02:00
parent eec2446723
commit 7b9c7f0fb2

View File

@ -177,6 +177,7 @@ void tcp_listener(struct listen_endpoint* endpoint, int num_endpoints, int activ
while (1) {
in_socket = accept(endpoint[active_endpoint].socketfd, 0, 0);
CHECK_RES_RETURN(in_socket, "accept", /*void*/ );
print_message(msg_fd, "accepted fd %d\n", in_socket);
switch(fork()) {