bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25790: guile-2.1.7 SOCK_CLOEXEC etc


From: Matt Wette
Subject: bug#25790: guile-2.1.7 SOCK_CLOEXEC etc
Date: Mon, 20 Feb 2017 14:06:14 -0800

I see the same problem on Mac OS.

If the following appeared in a header somewhere CLOEXEC would work:
#define SOCK_CLOEXEC FD_CLOEXEC
It would work.  Note the implementation in lib/accept4.c:
#ifndef SOCK_CLOEXEC
#define SOCK_CLOEXEC 0
#endif
Then later the flags to accept4 have SOCK_CLOEXEC set, then the call to fcntl 
includes FD_CLOEXEC. 
So any system that defines FD_CLOEXEC should be able to use SOCK_CLOEXEC.  But 
it needs to be defined.

I assume if a system supports O_NONBLOCK then something could be done with 
SOCK_NONBLOCK also.

I was going to submit a patch that is the same, except that I removed the text 
“No ifdef as accept4 has a gnulib implementation.”

Matt







reply via email to

[Prev in Thread] Current Thread [Next in Thread]