mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: use F_SETNOSIGPIPE to SIGPIPE husing on a OS X.
This commit is contained in:
parent
98a8fbdc7a
commit
d99b2a4b16
@ -8493,6 +8493,14 @@ static THREAD_RESULT __cold THREAD_CALL mdbx_env_copythr(void *arg) {
|
|||||||
int toggle = 0, wsize;
|
int toggle = 0, wsize;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
#if defined(F_SETNOSIGPIPE)
|
||||||
|
/* OS X delivers SIGPIPE to the whole process, not the thread that caused it.
|
||||||
|
* Disable SIGPIPE using platform specific fcntl. */
|
||||||
|
int enabled = 1;
|
||||||
|
if (fcntl(my->mc_fd, F_SETNOSIGPIPE, &enabled))
|
||||||
|
my->mc_error = errno;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(SIGPIPE) && !defined(_WIN32) && !defined(_WIN64)
|
#if defined(SIGPIPE) && !defined(_WIN32) && !defined(_WIN64)
|
||||||
sigset_t set;
|
sigset_t set;
|
||||||
sigemptyset(&set);
|
sigemptyset(&set);
|
||||||
|
Loading…
Reference in New Issue
Block a user