Difference between closing terminal and closing shell on child processes

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












Opening a new terminal and typing the command firefox& inside, ps -l gives :



4 R 1000 23132 23104 99 80 0 - 2177945 - pts/27 00:00:07 firefox


If the shell is closed with the command exit, the firefox child process become an orphan and stays open with PPID 1.



The result of ps -el|grep firefox is then :



4 S 1000 23132 1 14 80 0 - 2233312 poll_s ? 00:00:21 firefox


But if the terminal is closed (instead of closing the shell), firefox is closed as well.



What is happening there ? Is SIGTERM sent to the terminal, the bash shell and all child processes ?



Is there a command that has the same effect as closing the terminal that can be used in the shell ?









share

























    up vote
    0
    down vote

    favorite












    Opening a new terminal and typing the command firefox& inside, ps -l gives :



    4 R 1000 23132 23104 99 80 0 - 2177945 - pts/27 00:00:07 firefox


    If the shell is closed with the command exit, the firefox child process become an orphan and stays open with PPID 1.



    The result of ps -el|grep firefox is then :



    4 S 1000 23132 1 14 80 0 - 2233312 poll_s ? 00:00:21 firefox


    But if the terminal is closed (instead of closing the shell), firefox is closed as well.



    What is happening there ? Is SIGTERM sent to the terminal, the bash shell and all child processes ?



    Is there a command that has the same effect as closing the terminal that can be used in the shell ?









    share























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Opening a new terminal and typing the command firefox& inside, ps -l gives :



      4 R 1000 23132 23104 99 80 0 - 2177945 - pts/27 00:00:07 firefox


      If the shell is closed with the command exit, the firefox child process become an orphan and stays open with PPID 1.



      The result of ps -el|grep firefox is then :



      4 S 1000 23132 1 14 80 0 - 2233312 poll_s ? 00:00:21 firefox


      But if the terminal is closed (instead of closing the shell), firefox is closed as well.



      What is happening there ? Is SIGTERM sent to the terminal, the bash shell and all child processes ?



      Is there a command that has the same effect as closing the terminal that can be used in the shell ?









      share













      Opening a new terminal and typing the command firefox& inside, ps -l gives :



      4 R 1000 23132 23104 99 80 0 - 2177945 - pts/27 00:00:07 firefox


      If the shell is closed with the command exit, the firefox child process become an orphan and stays open with PPID 1.



      The result of ps -el|grep firefox is then :



      4 S 1000 23132 1 14 80 0 - 2233312 poll_s ? 00:00:21 firefox


      But if the terminal is closed (instead of closing the shell), firefox is closed as well.



      What is happening there ? Is SIGTERM sent to the terminal, the bash shell and all child processes ?



      Is there a command that has the same effect as closing the terminal that can be used in the shell ?







      linux bash terminal process





      share












      share










      share



      share










      asked 9 mins ago









      bob dylan

      3391311




      3391311

























          active

          oldest

          votes











          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%2f476210%2fdifference-between-closing-terminal-and-closing-shell-on-child-processes%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476210%2fdifference-between-closing-terminal-and-closing-shell-on-child-processes%23new-answer', 'question_page');

          );

          Post as a guest













































































          Z9,YVNUEHE04F G4nczi MeXEkJ9tqgEqWcvW0t
          vYX Vd jm jYDt0hRa9GGfU 9EKu,kX BMbVzxF9ImT d7wZ3YVzMxrjt2z TY qneL

          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