mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
pid1: reconnect to the console before being re-executed
When re-executed, reconnect the console to PID1's stdios as it was the case when PID1 was initially started by the kernel.
This commit is contained in:
parent
2065ca699b
commit
affd7ed1a9
@ -1967,6 +1967,9 @@ finish:
|
||||
log_error_errno(r, "Failed to switch root, trying to continue: %m");
|
||||
}
|
||||
|
||||
/* Reopen the console */
|
||||
(void) make_console_stdio();
|
||||
|
||||
args_size = MAX(6, argc+1);
|
||||
args = newa(const char*, args_size);
|
||||
|
||||
@ -2018,9 +2021,6 @@ finish:
|
||||
arg_serialization = safe_fclose(arg_serialization);
|
||||
fds = fdset_free(fds);
|
||||
|
||||
/* Reopen the console */
|
||||
(void) make_console_stdio();
|
||||
|
||||
for (j = 1, i = 1; j < (unsigned) argc; j++)
|
||||
args[i++] = argv[j];
|
||||
args[i++] = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user