libdill icon indicating copy to clipboard operation
libdill copied to clipboard

Set close-on-exec flagas to avoid FD leaks to subprocesses

Open jcarrano opened this issue 2 years ago • 0 comments

Description

These fixes prevent file descriptor leaks in my application. There may still be other potential leak sources in functions that my application does not use.

I tried to implement accept() using accept4() if it is available since that avoids a potential race condition. Same with fcntl(n,F_DUPFD_CLOEXEC,0) instead of dup().

jcarrano avatar Dec 02 '22 16:12 jcarrano