diff options
author | jimw@mysql.com <> | 2005-10-11 09:12:12 -0700 |
---|---|---|
committer | jimw@mysql.com <> | 2005-10-11 09:12:12 -0700 |
commit | c8a6c2c6143dd8c92704920d455cc57050ce71ad (patch) | |
tree | 4607d81d45be27a727b93a40191ed4853e10f8ef /vio/viosocket.c | |
parent | 52181cc810ecf3d2103d7782055c14b7157aabcb (diff) | |
download | mariadb-git-c8a6c2c6143dd8c92704920d455cc57050ce71ad.tar.gz |
Fix wait_timeout (and kill) handling on Mac OS X by cleaning up how
signal handlers are set up, the blocking flags for sockets are set,
and which thread-related functions are used. (Bug #8731)
Diffstat (limited to 'vio/viosocket.c')
-rw-r--r-- | vio/viosocket.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vio/viosocket.c b/vio/viosocket.c index 5213390e2e6..8d4c2387632 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -92,7 +92,14 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode, else vio->fcntl_mode |= O_NONBLOCK; /* set bit */ if (old_fcntl != vio->fcntl_mode) - r = fcntl(vio->sd, F_SETFL, vio->fcntl_mode); + { + r= fcntl(vio->sd, F_SETFL, vio->fcntl_mode); + if (r == -1) + { + DBUG_PRINT("info", ("fcntl failed, errno %d", errno)); + vio->fcntl_mode= old_fcntl; + } + } } #else r= set_blocking_mode ? 0 : 1; |