setsid only fails with EPERM, and it only fails if we're already the process leader (which is what would happen if it succeeded).
Patch attached to prevent tab damage
From 1adb95330ea7ce6d686efed04b20533ade382063 Mon Sep 17 00:00:00 2001 From: Jesse Adkins <[email protected]> Date: Fri, 17 Sep 2010 14:58:27 -0700 Subject: [PATCH] xfree86 linux: Don't complain about setsid failures. setsid only fails with EPERM, and it only fails if we're already the process leader (which is what would happen if it succeeded). Signed-off-by: Jesse Adkins <[email protected]> --- hw/xfree86/os-support/linux/lnx_init.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c index 92bfde4..222bbe4 100644 --- a/hw/xfree86/os-support/linux/lnx_init.c +++ b/hw/xfree86/os-support/linux/lnx_init.c @@ -157,10 +157,9 @@ xf86OpenConsole(void) xf86Msg(X_WARNING, "xf86OpenConsole: setpgid failed: %s\n", strerror(errno)); - /* become process group leader */ - if ((setsid() < 0)) - xf86Msg(X_WARNING, "xf86OpenConsole: setsid failed: %s\n", - strerror(errno)); + /* Try to become the process group leader. There's no need to check + this, since it only fails if we're already the leader. */ + setsid(); } i=0; -- 1.7.0.4
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
