Why does SaK kill gdm, which is running on a different VT?

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I run Fedora Linux 28, and have enabled sysrq. I pressed Alt+PrtScr+K, to kill a non-responsive X session. But this also restarted gdm, and one other X session, which were running on different VTs. Why?







share|improve this question























    up vote
    0
    down vote

    favorite












    I run Fedora Linux 28, and have enabled sysrq. I pressed Alt+PrtScr+K, to kill a non-responsive X session. But this also restarted gdm, and one other X session, which were running on different VTs. Why?







    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I run Fedora Linux 28, and have enabled sysrq. I pressed Alt+PrtScr+K, to kill a non-responsive X session. But this also restarted gdm, and one other X session, which were running on different VTs. Why?







      share|improve this question











      I run Fedora Linux 28, and have enabled sysrq. I pressed Alt+PrtScr+K, to kill a non-responsive X session. But this also restarted gdm, and one other X session, which were running on different VTs. Why?









      share|improve this question










      share|improve this question




      share|improve this question









      asked Jun 21 at 15:48









      sourcejedi

      18.1k22375




      18.1k22375




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted











          1. Linux SaK kills all processes which have the current tty open.



            See https://elixir.bootlin.com/linux/v4.17/source/drivers/tty/tty_io.c#L2700




          2. systemd-logind appears to open all active ttys.



            You can verify this using lsof.



          3. When X is run as an unprivileged user and relies on systemd-logind, it does not handle a restart of systemd-logind. When X loses its connection to systemd-logind, it terminates itself.

          Alternative



          So SaK can indirectly affect all VTs, if you use unprivileged X, or Wayland.



          Instead, you can use Alt+PrtScr+R, then Ctrl+Alt+F6. You can log in on the text console, and manually kill processes e.g. Xorg, or gnome-shell if you use a GNOME Wayland session).






          share|improve this answer























            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451136%2fwhy-does-sak-kill-gdm-which-is-running-on-a-different-vt%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted











            1. Linux SaK kills all processes which have the current tty open.



              See https://elixir.bootlin.com/linux/v4.17/source/drivers/tty/tty_io.c#L2700




            2. systemd-logind appears to open all active ttys.



              You can verify this using lsof.



            3. When X is run as an unprivileged user and relies on systemd-logind, it does not handle a restart of systemd-logind. When X loses its connection to systemd-logind, it terminates itself.

            Alternative



            So SaK can indirectly affect all VTs, if you use unprivileged X, or Wayland.



            Instead, you can use Alt+PrtScr+R, then Ctrl+Alt+F6. You can log in on the text console, and manually kill processes e.g. Xorg, or gnome-shell if you use a GNOME Wayland session).






            share|improve this answer



























              up vote
              1
              down vote



              accepted











              1. Linux SaK kills all processes which have the current tty open.



                See https://elixir.bootlin.com/linux/v4.17/source/drivers/tty/tty_io.c#L2700




              2. systemd-logind appears to open all active ttys.



                You can verify this using lsof.



              3. When X is run as an unprivileged user and relies on systemd-logind, it does not handle a restart of systemd-logind. When X loses its connection to systemd-logind, it terminates itself.

              Alternative



              So SaK can indirectly affect all VTs, if you use unprivileged X, or Wayland.



              Instead, you can use Alt+PrtScr+R, then Ctrl+Alt+F6. You can log in on the text console, and manually kill processes e.g. Xorg, or gnome-shell if you use a GNOME Wayland session).






              share|improve this answer

























                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted







                1. Linux SaK kills all processes which have the current tty open.



                  See https://elixir.bootlin.com/linux/v4.17/source/drivers/tty/tty_io.c#L2700




                2. systemd-logind appears to open all active ttys.



                  You can verify this using lsof.



                3. When X is run as an unprivileged user and relies on systemd-logind, it does not handle a restart of systemd-logind. When X loses its connection to systemd-logind, it terminates itself.

                Alternative



                So SaK can indirectly affect all VTs, if you use unprivileged X, or Wayland.



                Instead, you can use Alt+PrtScr+R, then Ctrl+Alt+F6. You can log in on the text console, and manually kill processes e.g. Xorg, or gnome-shell if you use a GNOME Wayland session).






                share|improve this answer
















                1. Linux SaK kills all processes which have the current tty open.



                  See https://elixir.bootlin.com/linux/v4.17/source/drivers/tty/tty_io.c#L2700




                2. systemd-logind appears to open all active ttys.



                  You can verify this using lsof.



                3. When X is run as an unprivileged user and relies on systemd-logind, it does not handle a restart of systemd-logind. When X loses its connection to systemd-logind, it terminates itself.

                Alternative



                So SaK can indirectly affect all VTs, if you use unprivileged X, or Wayland.



                Instead, you can use Alt+PrtScr+R, then Ctrl+Alt+F6. You can log in on the text console, and manually kill processes e.g. Xorg, or gnome-shell if you use a GNOME Wayland session).







                share|improve this answer















                share|improve this answer



                share|improve this answer








                edited Jun 21 at 15:54


























                answered Jun 21 at 15:48









                sourcejedi

                18.1k22375




                18.1k22375






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451136%2fwhy-does-sak-kill-gdm-which-is-running-on-a-different-vt%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    JHnlv6tMWSHl8wAb2x Fyrhb9GR LQ6,GYrCfpIr,Hb oeV5yP6 7XfIXipy26 HHK20zR2,RL,vJkB
                    uYwO6EEFmino4Sr5Iik6I rf,ox3g,z5yrD2YxA5iS,AUD,mkY5 LunEdIDg7aAe7ORMbc0KCj2 3CkQUH

                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    How many registers does an x86_64 CPU actually have?

                    Displaying single band from multi-band raster using QGIS