How can I kill all child processes of a certain process from the command line?

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 both regular Chrome and Chrome Canary (from now on, Canary). Sometimes I want to kill all subprocesses, Google Chrome Helper, of Canary. The problem is that they have the same name as the subprocesses of regular Chrome so killall "Google Chrome Helper" would kill both Canary's and Chromes' subprocesses.



How can, with a "oneliner" or similar, I kill all subprocesses of Canary without killing the subprocesses of Chrome with the same name?



Mac OS X










share|improve this question



























    up vote
    0
    down vote

    favorite












    I run both regular Chrome and Chrome Canary (from now on, Canary). Sometimes I want to kill all subprocesses, Google Chrome Helper, of Canary. The problem is that they have the same name as the subprocesses of regular Chrome so killall "Google Chrome Helper" would kill both Canary's and Chromes' subprocesses.



    How can, with a "oneliner" or similar, I kill all subprocesses of Canary without killing the subprocesses of Chrome with the same name?



    Mac OS X










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I run both regular Chrome and Chrome Canary (from now on, Canary). Sometimes I want to kill all subprocesses, Google Chrome Helper, of Canary. The problem is that they have the same name as the subprocesses of regular Chrome so killall "Google Chrome Helper" would kill both Canary's and Chromes' subprocesses.



      How can, with a "oneliner" or similar, I kill all subprocesses of Canary without killing the subprocesses of Chrome with the same name?



      Mac OS X










      share|improve this question















      I run both regular Chrome and Chrome Canary (from now on, Canary). Sometimes I want to kill all subprocesses, Google Chrome Helper, of Canary. The problem is that they have the same name as the subprocesses of regular Chrome so killall "Google Chrome Helper" would kill both Canary's and Chromes' subprocesses.



      How can, with a "oneliner" or similar, I kill all subprocesses of Canary without killing the subprocesses of Chrome with the same name?



      Mac OS X







      command-line osx kill process-management






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 13 at 8:28









      dr01

      15.9k114869




      15.9k114869










      asked Sep 13 at 7:59









      hensti

      433




      433




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Try using the -P option of pkill:




          -P ppid Restrict matches to processes with a parent process ID in the
          comma-separated list ppid.







          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%2f468732%2fhow-can-i-kill-all-child-processes-of-a-certain-process-from-the-command-line%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










            Try using the -P option of pkill:




            -P ppid Restrict matches to processes with a parent process ID in the
            comma-separated list ppid.







            share|improve this answer
























              up vote
              1
              down vote



              accepted










              Try using the -P option of pkill:




              -P ppid Restrict matches to processes with a parent process ID in the
              comma-separated list ppid.







              share|improve this answer






















                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                Try using the -P option of pkill:




                -P ppid Restrict matches to processes with a parent process ID in the
                comma-separated list ppid.







                share|improve this answer












                Try using the -P option of pkill:




                -P ppid Restrict matches to processes with a parent process ID in the
                comma-separated list ppid.








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 13 at 9:11









                mosvy

                1,59719




                1,59719



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f468732%2fhow-can-i-kill-all-child-processes-of-a-certain-process-from-the-command-line%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

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

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?