shutdown_test.c revision 40f53fa8d9c6a4fc38c0014495e7a42b08f52481
/*
* Copyright (C) 1998-2000 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: shutdown_test.c,v 1.16 2000/08/01 01:13:20 tale Exp $ */
#include <config.h>
#include <stdlib.h>
typedef struct {
isc_task_t * task;
isc_timer_t * timer;
unsigned int ticks;
char name[16];
isc_task_t * peer;
} t_info;
#define MAX_TASKS 3
static unsigned int task_count;
static isc_taskmgr_t * task_manager;
static isc_timermgr_t * timer_manager;
static void
}
static void
}
static void
sizeof *event);
}
}
static void
}
static void
{
t1_shutdown, &tasks[0],
sizeof *event);
}
sizeof *event);
}
}
static t_info *
} else
task_count++;
return (ti);
}
int
unsigned int workers;
if (argc > 1)
else
workers = 2;
/*
* Test run-triggered shutdown.
*/
/*
* Test implicit shutdown.
*/
/*
* Test anti-zombie code.
*/
printf("Statistics for mctx:\n");
printf("Statistics for mctx2:\n");
return (0);
}