+2979. [bug] named could deadlock during shutdown if two
+ "rndc stop" commands were issued at the same
+ time. [RT #22108]
+
2978. [port] hpux: look for <devpoll.h> [RT #21919]
2976. [bug] named could die on exit after negotiating a GSS-TSIG
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: control.c,v 1.33.266.2 2009/07/11 23:47:17 tbox Exp $ */
+/* $Id: control.c,v 1.33.266.3 2010/12/03 22:03:40 each Exp $ */
/*! \file */
* isc_app_shutdown below.
*/
#endif
+ /* Do not flush master files */
ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
ns_os_shutdownmsg(command, text);
isc_app_shutdown();
result = ISC_R_SUCCESS;
} else if (command_compare(command, NS_COMMAND_STOP)) {
+ /*
+ * "stop" is the same as "halt" except it does
+ * flush master files.
+ */
#ifdef HAVE_LIBSCF
if (ns_smf_got_instance == 1 && ns_smf_chroot == 1) {
result = ns_smf_add_message(text);
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: task.h,v 1.61.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: task.h,v 1.61.332.3 2010/12/03 22:03:41 each Exp $ */
#ifndef ISC_TASK_H
#define ISC_TASK_H 1
*\li '*t' has the "current time".
*/
+isc_boolean_t
+isc_task_exiting(isc_task_t *t);
+/*%<
+ * Returns ISC_TRUE if the task is in the process of shutting down,
+ * ISC_FALSE otherwise.
+ *
+ * Requires:
+ *\li 'task' is a valid task.
+ */
+
/*****
***** Task Manager.
*****/
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: task.c,v 1.107 2008/03/27 23:46:57 tbox Exp $ */
+/* $Id: task.c,v 1.107.120.1 2010/12/03 22:03:40 each Exp $ */
/*! \file
* \author Principal Author: Bob Halley
#endif
}
-#ifdef HAVE_LIBXML2
+isc_boolean_t
+isc_task_exiting(isc_task_t *t) {
+ isc_task_t *task = (isc_task_t *)t;
+
+ REQUIRE(VALID_TASK(task));
+ return (TASK_SHUTTINGDOWN(task));
+}
+#ifdef HAVE_LIBXML2
void
isc_taskmgr_renderxml(isc_taskmgr_t *mgr, xmlTextWriterPtr writer)
{
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.c,v 1.308.12.15 2010/12/03 00:59:31 marka Exp $ */
+/* $Id: socket.c,v 1.308.12.16 2010/12/03 22:03:41 each Exp $ */
/*! \file */
* Attach to socket and to task.
*/
isc_task_attach(task, &ntask);
+ if (isc_task_exiting(ntask)) {
+ isc_task_detach(&ntask);
+ isc_event_free(ISC_EVENT_PTR(&dev));
+ UNLOCK(&sock->lock);
+ return (ISC_R_SHUTTINGDOWN);
+ }
nsock->references++;
nsock->statsindex = sock->statsindex;
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.c,v 1.70.54.7 2010/11/18 00:58:40 tbox Exp $ */
+/* $Id: socket.c,v 1.70.54.8 2010/12/03 22:03:41 each Exp $ */
/* This code uses functions which are only available on Server 2003 and
* higher, and Windows XP and higher.
* Attach to socket and to task.
*/
isc_task_attach(task, &ntask);
+ if (isc_task_exiting(ntask)) {
+ isc_task_detach(&ntask);
+ isc_event_free(ISC_EVENT_PTR(&dev));
+ UNLOCK(&sock->lock);
+ return (ISC_R_SHUTTINGDOWN);
+ }
nsock->references++;
adev->ev_sender = ntask;