[PATCH xinit] Remove workaround for xterm -L (#89653)

Hans de Goede hdegoede at redhat.com
Tue Mar 24 03:33:28 PDT 2015


Hi,

On 24-03-15 05:49, Peter Hutterer wrote:
> The -L flag was removed in 1989.
>
> This enables the legacy keyboard driver again when the server is started
> with -keeptty (bd6cacdd3661)
>
> X.Org Bug 89653 <http://bugs.freedesktop.org/show_bug.cgi?id=89653>
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> No idea what exactly is going on here, I tried to bisect the server to get
> some hints what triggers what there are too many moving targets. Either
> way, with this patch applied, a basic xorg.conf that uses the kbd driver
> works again with startx/xinit (provided a suid Xorg binary of course)
>
> Thanks to alanc for digging up the commit that removed the -L option.
> http://cgit.freedesktop.org/~alanc/xc-historical/commit/xc/programs/xterm?id=46fc268c21d01cf0d664c84e5d03f785b2b2e5ce

I'm afraid that this causes a regression, with this patch the Xserver no
longer cleanly exits when the last client disconnects.

Test-case:

-Fully up2date 64 bit Fedora-22 system
-xinit rpm package build with this patch
-do: "startx /usr/bin/xterm -title foo"
-exit the shell in the xterm
-now Xorg hangs using aprox 100% cpu, strace shows that it
  sits in a select() loop

Regards,

Hans




>
>   xinit.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/xinit.c b/xinit.c
> index 1b04911..74fda74 100644
> --- a/xinit.c
> +++ b/xinit.c
> @@ -417,11 +417,7 @@ startServer(char *server_argv[])
>            * at xinit when ready to accept connections
>            */
>           signal(SIGUSR1, SIG_IGN);
> -        /*
> -         * prevent server from getting sighup from vhangup()
> -         * if client is xterm -L
> -         */
> -        setpgid(0,getpid());
> +
>           Execute(server_argv);
>
>           Error("unable to run server \"%s\"", server_argv[0]);
>


More information about the xorg-devel mailing list