[Toybox] [PATCH] killall should kill scripts too.

enh enh at google.com
Mon Dec 18 21:15:01 PST 2017


On Mon, Dec 18, 2017 at 5:07 PM, enh <enh at google.com> wrote:
> On Sun, Dec 17, 2017 at 9:40 AM, Rob Landley <rob at landley.net> wrote:
>> On 12/17/2017 11:20 AM, Rob Landley wrote:
>>> Sigh. You argument that "we can't just do something easily explained but
>>> must copy ubuntu's magic edge cases exactly" implies I need to
>>> understand ubuntu's magic edge cases, which are nonobvious.
>>
>> I should clarify: what I'm uncomfortable with is the need to read
>> multiple /proc files per process, because the speed of lsof is just
>> _sad_ and the cpu usage of top is unpleasant. (Part of the reason I
>> haven't finished cleaning up lsof yet is I still hope to be able to
>> speed it up somehow, which is a largeish time sink every time I turn my
>> attention to it.)
>>
>> Having killall need to do similar grinding over a large number of
>> processes seems unnecessary. That said, it looks like to match ubuntu's
>> killall we would need to read two files _and_ stat /proc/$$/exe.
>
> that's still a lot lighter weight than all the work pgrep/pkill have
> to do, and it's what everyone's already living with anyway...

(and toybox lsof is still 10x faster than FSF lsof on my machines. i
don't think lsof is high on the list of things to worry about. even
for top, i'm more worried about the fact that it crashes if you leave
it running long enough, or the broken ps -AT...)

>> Rob
>
>
>
> --
> Elliott Hughes - http://who/enh - http://jessies.org/~enh/
> Android native code/tools questions? Mail me/drop by/add me as a reviewer.



-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.



More information about the Toybox mailing list