mirror of
https://github.com/libretro/RetroArch
synced 2025-04-24 15:02:35 +00:00
Check if setting CLOEXEC fails on the Netplay server port.
This commit is contained in:
parent
e799defcb8
commit
06550ec289
@ -846,7 +846,8 @@ static int init_tcp_connection(const struct addrinfo *res,
|
|||||||
|
|
||||||
#if defined(F_SETFD) && defined(FD_CLOEXEC)
|
#if defined(F_SETFD) && defined(FD_CLOEXEC)
|
||||||
/* Don't let any inherited processes keep open our port */
|
/* Don't let any inherited processes keep open our port */
|
||||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0)
|
||||||
|
RARCH_WARN("Cannot set Netplay port to close-on-exec. It may fail to reopen if the client disconnects.\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user