From 5e4376eec12a2e9ab3f3d3406cde525900719877 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 9 Oct 2009 15:00:38 +0200 Subject: [PATCH] switch_root: remove TIOCSCTTY and setsid() requested by dracut developers because: bash: cannot set terminal process group (-1): Inappropriate ioctl for device Addresses-Red-Hat-Bug: #519237 Signed-off-by: Karel Zak --- sys-utils/switch_root.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys-utils/switch_root.c b/sys-utils/switch_root.c index b192a08e..174e667c 100644 --- a/sys-utils/switch_root.c +++ b/sys-utils/switch_root.c @@ -267,13 +267,6 @@ int main(int argc, char *argv[]) if (access(init, X_OK)) warn("cannot access %s", init); - /* get session leader */ - setsid(); - - /* set controlling terminal */ - if (ioctl (0, TIOCSCTTY, 1)) - warn("failed to TIOCSCTTY"); - execv(init, initargs); err(EXIT_FAILURE, "failed to execute %s", init); } -- 2.39.5