char *vlib_default_runtime_dir = "vlib";
unix_main_t unix_main;
+clib_file_main_t file_main;
+vlib_physmem_main_t physmem_main;
static clib_error_t *
unix_main_init (vlib_main_t * vm)
static void
unix_signal_handler (int signum, siginfo_t * si, ucontext_t * uc)
{
- uword fatal;
+ uword fatal = 0;
u8 *msg = 0;
msg = format (msg, "received signal %U, PC %U",
if (unix_main.vlib_main->main_loop_exit_set)
{
syslog (LOG_ERR | LOG_DAEMON, "received SIGTERM, exiting...");
-
- clib_longjmp (&unix_main.vlib_main->main_loop_exit,
- VLIB_MAIN_LOOP_EXIT_CLI);
+ unix_main.vlib_main->main_loop_exit_now = 1;
}
+ break;
/* fall through */
case SIGQUIT:
case SIGINT:
vlib_default_runtime_dir, 0);
}
+ error = setup_signal_handlers (um);
+ if (error)
+ return error;
+
if (um->pidfile)
{
if ((error = vlib_unix_validate_runtime_file (um,
}
}
- error = setup_signal_handlers (um);
- if (error)
- return error;
-
if (!(um->flags & UNIX_FLAG_INTERACTIVE))
{
openlog (vm->name, LOG_CONS | LOG_PERROR | LOG_PID, LOG_DAEMON);
vlib_thread_stack_init (0);
__os_thread_index = 0;
+ vm->thread_index = 0;
i = clib_calljmp (thread0, (uword) vm,
(void *) (vlib_thread_stacks[0] +