Is telinit run as a daemon?












-1














In sysvinit, telinit is a symlink to init.



init is run as a daemon. Is telinit run as a daemon?



I don't have sysvinit installed on my Lubuntu. For comparison, systemctl plays similar role to systemd as telinit to init, and systemctl has a controlling terminal so is not running as a daemon, while systemd is run as a daemon.



Thanks.










share|improve this question



























    -1














    In sysvinit, telinit is a symlink to init.



    init is run as a daemon. Is telinit run as a daemon?



    I don't have sysvinit installed on my Lubuntu. For comparison, systemctl plays similar role to systemd as telinit to init, and systemctl has a controlling terminal so is not running as a daemon, while systemd is run as a daemon.



    Thanks.










    share|improve this question

























      -1












      -1








      -1







      In sysvinit, telinit is a symlink to init.



      init is run as a daemon. Is telinit run as a daemon?



      I don't have sysvinit installed on my Lubuntu. For comparison, systemctl plays similar role to systemd as telinit to init, and systemctl has a controlling terminal so is not running as a daemon, while systemd is run as a daemon.



      Thanks.










      share|improve this question













      In sysvinit, telinit is a symlink to init.



      init is run as a daemon. Is telinit run as a daemon?



      I don't have sysvinit installed on my Lubuntu. For comparison, systemctl plays similar role to systemd as telinit to init, and systemctl has a controlling terminal so is not running as a daemon, while systemd is run as a daemon.



      Thanks.







      systemd daemon init sysvinit






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 19 '18 at 12:27









      Tim

      26k74246455




      26k74246455






















          3 Answers
          3






          active

          oldest

          votes


















          3














          Whether a file is a symlink to another one has no bearing on how it runs. telinit, like systemctl, runs as a “normal” process.






          share|improve this answer





























            1














            Based on this question and on In sysvinit, do `telinit` and `init` run in the same process? I think you're confused around how programs can interact with symlinks.



            When a program has multiple names (symlinks, hardlinks) it can do different things based on how it is called.



            For example, here's a simple shell script



            $ cat x



            #!/bin/bash

            pname=${0##*/}

            case $pname in
            tina) echo "Tina Tuner doesn't need another hero" ;;
            fred) echo "The current date is: $(date)" ;;
            harry) sleep 3 ;;
            *) echo Call me tina or fred or harry
            esac


            It has symlinks:



            $ ls -l x tina fred harry
            lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:47 fred -> x*
            lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 harry -> x*
            lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 tina -> x*
            -rwxr-xr-x 1 sweh sweh 217 Dec 19 09:48 x*


            So now I can get different results, depending on how I call it:



            $ ./tina
            Tina Tuner doesn't need another hero
            $ ./fred
            The current date is: Wed Dec 19 09:50:00 EST 2018
            $ ./harry
            $ ./x
            Call me tina or fred or harry
            $ ln -s x something
            $ ./something
            Call me tina or fred or harry


            Now the sysv-init program does something similar. If started as telinit then it simply signals the main init program. If started as init (and possibly also if the PID is 1, but that's getting deeper into the weeds) then it starts as the main system init process.



            So, no; telinit is not a daemon.






            share|improve this answer





























              0















              init is run as a daemon. Is telinit run as a daemon?




              No, init binary has a different behaviour when invoked as telinit.






              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',
                autoActivateHeartbeat: false,
                convertImagesToLinks: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                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%2f489896%2fis-telinit-run-as-a-daemon%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                3














                Whether a file is a symlink to another one has no bearing on how it runs. telinit, like systemctl, runs as a “normal” process.






                share|improve this answer


























                  3














                  Whether a file is a symlink to another one has no bearing on how it runs. telinit, like systemctl, runs as a “normal” process.






                  share|improve this answer
























                    3












                    3








                    3






                    Whether a file is a symlink to another one has no bearing on how it runs. telinit, like systemctl, runs as a “normal” process.






                    share|improve this answer












                    Whether a file is a symlink to another one has no bearing on how it runs. telinit, like systemctl, runs as a “normal” process.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 19 '18 at 12:49









                    Stephen Kitt

                    164k24365444




                    164k24365444

























                        1














                        Based on this question and on In sysvinit, do `telinit` and `init` run in the same process? I think you're confused around how programs can interact with symlinks.



                        When a program has multiple names (symlinks, hardlinks) it can do different things based on how it is called.



                        For example, here's a simple shell script



                        $ cat x



                        #!/bin/bash

                        pname=${0##*/}

                        case $pname in
                        tina) echo "Tina Tuner doesn't need another hero" ;;
                        fred) echo "The current date is: $(date)" ;;
                        harry) sleep 3 ;;
                        *) echo Call me tina or fred or harry
                        esac


                        It has symlinks:



                        $ ls -l x tina fred harry
                        lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:47 fred -> x*
                        lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 harry -> x*
                        lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 tina -> x*
                        -rwxr-xr-x 1 sweh sweh 217 Dec 19 09:48 x*


                        So now I can get different results, depending on how I call it:



                        $ ./tina
                        Tina Tuner doesn't need another hero
                        $ ./fred
                        The current date is: Wed Dec 19 09:50:00 EST 2018
                        $ ./harry
                        $ ./x
                        Call me tina or fred or harry
                        $ ln -s x something
                        $ ./something
                        Call me tina or fred or harry


                        Now the sysv-init program does something similar. If started as telinit then it simply signals the main init program. If started as init (and possibly also if the PID is 1, but that's getting deeper into the weeds) then it starts as the main system init process.



                        So, no; telinit is not a daemon.






                        share|improve this answer


























                          1














                          Based on this question and on In sysvinit, do `telinit` and `init` run in the same process? I think you're confused around how programs can interact with symlinks.



                          When a program has multiple names (symlinks, hardlinks) it can do different things based on how it is called.



                          For example, here's a simple shell script



                          $ cat x



                          #!/bin/bash

                          pname=${0##*/}

                          case $pname in
                          tina) echo "Tina Tuner doesn't need another hero" ;;
                          fred) echo "The current date is: $(date)" ;;
                          harry) sleep 3 ;;
                          *) echo Call me tina or fred or harry
                          esac


                          It has symlinks:



                          $ ls -l x tina fred harry
                          lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:47 fred -> x*
                          lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 harry -> x*
                          lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 tina -> x*
                          -rwxr-xr-x 1 sweh sweh 217 Dec 19 09:48 x*


                          So now I can get different results, depending on how I call it:



                          $ ./tina
                          Tina Tuner doesn't need another hero
                          $ ./fred
                          The current date is: Wed Dec 19 09:50:00 EST 2018
                          $ ./harry
                          $ ./x
                          Call me tina or fred or harry
                          $ ln -s x something
                          $ ./something
                          Call me tina or fred or harry


                          Now the sysv-init program does something similar. If started as telinit then it simply signals the main init program. If started as init (and possibly also if the PID is 1, but that's getting deeper into the weeds) then it starts as the main system init process.



                          So, no; telinit is not a daemon.






                          share|improve this answer
























                            1












                            1








                            1






                            Based on this question and on In sysvinit, do `telinit` and `init` run in the same process? I think you're confused around how programs can interact with symlinks.



                            When a program has multiple names (symlinks, hardlinks) it can do different things based on how it is called.



                            For example, here's a simple shell script



                            $ cat x



                            #!/bin/bash

                            pname=${0##*/}

                            case $pname in
                            tina) echo "Tina Tuner doesn't need another hero" ;;
                            fred) echo "The current date is: $(date)" ;;
                            harry) sleep 3 ;;
                            *) echo Call me tina or fred or harry
                            esac


                            It has symlinks:



                            $ ls -l x tina fred harry
                            lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:47 fred -> x*
                            lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 harry -> x*
                            lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 tina -> x*
                            -rwxr-xr-x 1 sweh sweh 217 Dec 19 09:48 x*


                            So now I can get different results, depending on how I call it:



                            $ ./tina
                            Tina Tuner doesn't need another hero
                            $ ./fred
                            The current date is: Wed Dec 19 09:50:00 EST 2018
                            $ ./harry
                            $ ./x
                            Call me tina or fred or harry
                            $ ln -s x something
                            $ ./something
                            Call me tina or fred or harry


                            Now the sysv-init program does something similar. If started as telinit then it simply signals the main init program. If started as init (and possibly also if the PID is 1, but that's getting deeper into the weeds) then it starts as the main system init process.



                            So, no; telinit is not a daemon.






                            share|improve this answer












                            Based on this question and on In sysvinit, do `telinit` and `init` run in the same process? I think you're confused around how programs can interact with symlinks.



                            When a program has multiple names (symlinks, hardlinks) it can do different things based on how it is called.



                            For example, here's a simple shell script



                            $ cat x



                            #!/bin/bash

                            pname=${0##*/}

                            case $pname in
                            tina) echo "Tina Tuner doesn't need another hero" ;;
                            fred) echo "The current date is: $(date)" ;;
                            harry) sleep 3 ;;
                            *) echo Call me tina or fred or harry
                            esac


                            It has symlinks:



                            $ ls -l x tina fred harry
                            lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:47 fred -> x*
                            lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 harry -> x*
                            lrwxrwxrwx 1 sweh sweh 1 Dec 19 09:48 tina -> x*
                            -rwxr-xr-x 1 sweh sweh 217 Dec 19 09:48 x*


                            So now I can get different results, depending on how I call it:



                            $ ./tina
                            Tina Tuner doesn't need another hero
                            $ ./fred
                            The current date is: Wed Dec 19 09:50:00 EST 2018
                            $ ./harry
                            $ ./x
                            Call me tina or fred or harry
                            $ ln -s x something
                            $ ./something
                            Call me tina or fred or harry


                            Now the sysv-init program does something similar. If started as telinit then it simply signals the main init program. If started as init (and possibly also if the PID is 1, but that's getting deeper into the weeds) then it starts as the main system init process.



                            So, no; telinit is not a daemon.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Dec 19 '18 at 14:54









                            Stephen Harris

                            25.1k24477




                            25.1k24477























                                0















                                init is run as a daemon. Is telinit run as a daemon?




                                No, init binary has a different behaviour when invoked as telinit.






                                share|improve this answer


























                                  0















                                  init is run as a daemon. Is telinit run as a daemon?




                                  No, init binary has a different behaviour when invoked as telinit.






                                  share|improve this answer
























                                    0












                                    0








                                    0







                                    init is run as a daemon. Is telinit run as a daemon?




                                    No, init binary has a different behaviour when invoked as telinit.






                                    share|improve this answer













                                    init is run as a daemon. Is telinit run as a daemon?




                                    No, init binary has a different behaviour when invoked as telinit.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Dec 21 '18 at 2:41









                                    Cristian Rodríguez

                                    32612




                                    32612






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f489896%2fis-telinit-run-as-a-daemon%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        Morgemoulin

                                        Scott Moir

                                        Souastre