Merge "first_stage_init: Add SIGCHLD handler in first_stage_console"
This commit is contained in:
commit
ce8aa990d5
1 changed files with 3 additions and 0 deletions
|
@ -85,7 +85,10 @@ namespace init {
|
|||
|
||||
void StartConsole(const std::string& cmdline) {
|
||||
bool console = KernelConsolePresent(cmdline);
|
||||
// Use a simple sigchld handler -- first_stage_console doesn't need to track or log zombies
|
||||
const struct sigaction chld_act { .sa_handler = SIG_DFL, .sa_flags = SA_NOCLDWAIT };
|
||||
|
||||
sigaction(SIGCHLD, &chld_act, nullptr);
|
||||
pid_t pid = fork();
|
||||
if (pid != 0) {
|
||||
int status;
|
||||
|
|
Loading…
Reference in a new issue