diff options
author | unknown <jimw@mysql.com> | 2005-10-11 09:12:12 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-10-11 09:12:12 -0700 |
commit | e61dea1b3676844cf78e3cece5d5db1d4a0e847d (patch) | |
tree | 4607d81d45be27a727b93a40191ed4853e10f8ef /mysys/my_pthread.c | |
parent | 78f5997adef773dfd5b05f6921b5da8066067c37 (diff) | |
download | mariadb-git-e61dea1b3676844cf78e3cece5d5db1d4a0e847d.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)
configure.in:
Fix flags for Darwin 6 and later. Simplify Darwin 7-9 blocks to simply
be a catch-all for *darwin* so that future Darwin releases get the
latest flags.
include/config-win.h:
Define my_sigset() instead of sigset().
include/my_pthread.h:
Define my_sigset() instead of trying to monkey with sigset(), and favor
an implementation based on sigaction().
mysys/my_pthread.c:
Remove pthread_signal(), which is identical to the new my_sigset() macro.
mysys/thr_alarm.c:
Use my_sigset() instead of sigset().
sql/mysqld.cc:
Use my_sigset() instead of signal() and sigset(), remove unnecessary
definition of sigset on __amiga__. Remove unused THREAD_SPECIFIC_SIGPIPE
code.
A future improvement would be to re-assess the use of sigaction() here
and convert its usage to use my_sigset().
vio/vio.c:
Always call fcntl() to initialize flags of socket in initialization to
avoid problems on systems that don't report the flags on a socket
correctly right after it has been returned from accept(), such as
FreeBSD, Mac OS X, and possibly other BSD-derived systems.
vio/viosocket.c:
If fcntl() fails in vio_blocking(), restore the flags stored in the
vio struct.
mysql-test/r/wait_timeout.result:
New BitKeeper file ``mysql-test/r/wait_timeout.result''
mysql-test/t/wait_timeout-master.opt:
New BitKeeper file ``mysql-test/t/wait_timeout-master.opt''
mysql-test/t/wait_timeout.test:
New BitKeeper file ``mysql-test/t/wait_timeout.test''
Diffstat (limited to 'mysys/my_pthread.c')
-rw-r--r-- | mysys/my_pthread.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index 37517fb8327..315e966bf43 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -404,23 +404,6 @@ int sigwait(sigset_t *setp, int *sigp) #endif /* DONT_USE_SIGSUSPEND */ #endif /* HAVE_SIGWAIT */ -/***************************************************************************** -** Implement pthread_signal for systems that can't use signal() with threads -** Currently this is only used with BSDI 3.0 -*****************************************************************************/ - -#ifdef USE_PTHREAD_SIGNAL - -int pthread_signal(int sig, void (*func)()) -{ - struct sigaction sact; - sact.sa_flags= 0; - sact.sa_handler= func; - sigemptyset(&sact.sa_mask); - sigaction(sig, &sact, (struct sigaction*) 0); - return 0; -} -#endif /**************************************************************************** The following functions fixes that all pthread functions should work |