[systemd-devel] [PATCH] core/main.c: only reopen /dev/console if we switch-root to a custom init
Paul Menzel
paulepanter at users.sourceforge.net
Thu Jul 12 00:34:13 PDT 2012
Dear Harald,
thank you for the patch.
Am Donnerstag, den 12.07.2012, 08:43 +0200 schrieb harald at redhat.com:
> From: Harald Hoyer <harald at redhat.com>
What happens otherwise? Is there an error message?
> ---
> src/core/main.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/core/main.c b/src/core/main.c
> index 6f6b565..a7172c1 100644
> --- a/src/core/main.c
> +++ b/src/core/main.c
> @@ -1672,9 +1672,6 @@ finish:
> * rebooted while we do that */
> watchdog_close(true);
>
> - /* Reopen the console */
> - make_console_stdio();
> -
> if (switch_root_dir) {
> r = switch_root(switch_root_dir);
> if (r < 0)
> @@ -1711,6 +1708,9 @@ finish:
> execv(args[0], (char* const*) args);
> }
>
> + /* Reopen the console */
> + make_console_stdio();
> +
> /* Try the fallback, if there is any, without any
> * serialization. We pass the original argv[] and
> * envp[]. (Well, modulo the ordering changes due to
Thanks,
Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120712/3d612896/attachment.pgp>
More information about the systemd-devel
mailing list