Changeset View
Changeset View
Standalone View
Standalone View
head/sbin/init/init.c
Show First 20 Lines • Show All 1,623 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
switch (sig) { | switch (sig) { | ||||
case SIGHUP: | case SIGHUP: | ||||
if (current_state == read_ttys || current_state == multi_user || | if (current_state == read_ttys || current_state == multi_user || | ||||
current_state == clean_ttys || current_state == catatonia) | current_state == clean_ttys || current_state == catatonia) | ||||
requested_transition = clean_ttys; | requested_transition = clean_ttys; | ||||
break; | break; | ||||
case SIGWINCH: | |||||
case SIGUSR2: | case SIGUSR2: | ||||
howto = sig == SIGUSR2 ? RB_POWEROFF : RB_POWERCYCLE; | howto = RB_POWEROFF; | ||||
case SIGUSR1: | case SIGUSR1: | ||||
howto |= RB_HALT; | howto |= RB_HALT; | ||||
case SIGWINCH: | |||||
case SIGINT: | case SIGINT: | ||||
if (sig == SIGWINCH) | |||||
howto |= RB_POWERCYCLE; | |||||
Reboot = TRUE; | Reboot = TRUE; | ||||
case SIGTERM: | case SIGTERM: | ||||
if (current_state == read_ttys || current_state == multi_user || | if (current_state == read_ttys || current_state == multi_user || | ||||
current_state == clean_ttys || current_state == catatonia) | current_state == clean_ttys || current_state == catatonia) | ||||
requested_transition = death; | requested_transition = death; | ||||
else | else | ||||
requested_transition = death_single; | requested_transition = death_single; | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 414 Lines • Show Last 20 Lines |