@@ -127,7 +127,7 @@ using std::vector;
127
127
128
128
/* We have HAVE_purify below as this speeds up the shutdown of MySQL */
129
129
130
- #if defined(HAVE_DEC_3_2_THREADS) || defined(SIGNALS_DONT_BREAK_READ) || defined( HAVE_purify) && defined(__linux__)
130
+ #if defined(HAVE_DEC_3_2_THREADS) || defined(HAVE_purify) && defined(__linux__)
131
131
#define HAVE_CLOSE_SERVER_SOCK 1
132
132
#endif
133
133
@@ -1512,11 +1512,6 @@ void kill_mysql(void)
1512
1512
{
1513
1513
DBUG_ENTER (" kill_mysql" );
1514
1514
1515
- #if defined(SIGNALS_DONT_BREAK_READ) && !defined(EMBEDDED_LIBRARY)
1516
- abort_loop=1 ; // Break connection loops
1517
- close_server_sock (); // Force accept to wake up
1518
- #endif
1519
-
1520
1515
#if defined(__WIN__)
1521
1516
#if !defined(EMBEDDED_LIBRARY)
1522
1517
{
@@ -1537,22 +1532,11 @@ void kill_mysql(void)
1537
1532
{
1538
1533
DBUG_PRINT (" error" ,(" Got error %d from pthread_kill" ,errno)); /* purecov: inspected */
1539
1534
}
1540
- #elif !defined(SIGNALS_DONT_BREAK_READ)
1535
+ #else
1541
1536
kill (current_pid, MYSQL_KILL_SIGNAL);
1542
1537
#endif
1543
1538
DBUG_PRINT (" quit" ,(" After pthread_kill" ));
1544
1539
shutdown_in_progress=1 ; // Safety if kill didn't work
1545
- #ifdef SIGNALS_DONT_BREAK_READ
1546
- if (!kill_in_progress)
1547
- {
1548
- pthread_t tmp;
1549
- abort_loop=1 ;
1550
- if (mysql_thread_create (0 , /* Not instrumented */
1551
- &tmp, &connection_attrib, kill_server_thread,
1552
- (void *) 0 ))
1553
- sql_print_error (" Can't create thread to kill server" );
1554
- }
1555
- #endif
1556
1540
DBUG_VOID_RETURN;
1557
1541
}
1558
1542
@@ -1676,22 +1660,14 @@ static void clean_up_error_log_mutex()
1676
1660
/* *
1677
1661
cleanup all memory and end program nicely.
1678
1662
1679
- If SIGNALS_DONT_BREAK_READ is defined, this function is called
1680
- by the main thread. To get MySQL to shut down nicely in this case
1681
- (Mac OS X) we have to call exit() instead if pthread_exit().
1682
-
1683
1663
@note
1684
1664
This function never returns.
1685
1665
*/
1686
1666
void unireg_end (void )
1687
1667
{
1688
1668
clean_up (1 );
1689
1669
my_thread_end ();
1690
- #if defined(SIGNALS_DONT_BREAK_READ)
1691
- exit (0 );
1692
- #else
1693
1670
pthread_exit (0 ); // Exit is in main thread
1694
- #endif
1695
1671
}
1696
1672
1697
1673
@@ -6096,24 +6072,6 @@ static void create_new_thread(THD *thd)
6096
6072
}
6097
6073
#endif /* EMBEDDED_LIBRARY */
6098
6074
6099
-
6100
- #ifdef SIGNALS_DONT_BREAK_READ
6101
- inline void kill_broken_server ()
6102
- {
6103
- /* hack to get around signals ignored in syscalls for problem OS's */
6104
- if (mysql_get_fd (unix_sock) == INVALID_SOCKET ||
6105
- (!opt_disable_networking && mysql_socket_getfd (ip_sock) == INVALID_SOCKET))
6106
- {
6107
- select_thread_in_use = 0 ;
6108
- /* The following call will never return */
6109
- kill_server ((void *) MYSQL_KILL_SIGNAL);
6110
- }
6111
- }
6112
- #define MAYBE_BROKEN_SYSCALL kill_broken_server ();
6113
- #else
6114
- #define MAYBE_BROKEN_SYSCALL
6115
- #endif
6116
-
6117
6075
/* Handle new connections and spawn new process to handle them */
6118
6076
6119
6077
#ifndef EMBEDDED_LIBRARY
@@ -6176,7 +6134,6 @@ void handle_connections_sockets()
6176
6134
#endif
6177
6135
6178
6136
DBUG_PRINT (" general" ,(" Waiting for connections." ));
6179
- MAYBE_BROKEN_SYSCALL;
6180
6137
while (!abort_loop)
6181
6138
{
6182
6139
#ifdef HAVE_POLL
@@ -6200,13 +6157,11 @@ void handle_connections_sockets()
6200
6157
if (!select_errors++ && !abort_loop) /* purecov: inspected */
6201
6158
sql_print_error (" mysqld: Got error %d from select" ,socket_errno); /* purecov: inspected */
6202
6159
}
6203
- MAYBE_BROKEN_SYSCALL
6204
6160
continue ;
6205
6161
}
6206
6162
6207
6163
if (abort_loop)
6208
6164
{
6209
- MAYBE_BROKEN_SYSCALL;
6210
6165
break ;
6211
6166
}
6212
6167
@@ -6258,7 +6213,6 @@ void handle_connections_sockets()
6258
6213
if (mysql_socket_getfd (new_sock) != INVALID_SOCKET ||
6259
6214
(socket_errno != SOCKET_EINTR && socket_errno != SOCKET_EAGAIN))
6260
6215
break ;
6261
- MAYBE_BROKEN_SYSCALL;
6262
6216
#if !defined(NO_FCNTL_NONBLOCK)
6263
6217
if (!(test_flags & TEST_BLOCKING))
6264
6218
{
@@ -6281,7 +6235,6 @@ void handle_connections_sockets()
6281
6235
statistic_increment_rwlock (connection_errors_accept, &LOCK_status);
6282
6236
if ((error_count++ & 255 ) == 0 ) // This can happen often
6283
6237
sql_perror (" Error in accept" );
6284
- MAYBE_BROKEN_SYSCALL;
6285
6238
if (socket_errno == SOCKET_ENFILE || socket_errno == SOCKET_EMFILE)
6286
6239
sleep (1 ); // Give other threads some time
6287
6240
continue ;
0 commit comments