You are not logged in.

#1 2020-08-06 18:36:10

ephemeral
Member
Registered: 2020-08-06
Posts: 4

Problems killing processes by name

So a while back I noticed I can't kill a process by name (alone) anymore. I used to be able to simply type "pkill firefox" and proceed with life, but it no longer works.

user@oberon ~$ ps -ef | grep firefox
user      118139    1011  1 11:25 ?        00:00:04 /usr/lib/firefox/firefox
user      118238  118139  3 11:25 ?        00:00:08 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118292  118139  0 11:25 ?        00:00:01 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 6792 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118335  118139  0 11:25 ?        00:00:00 /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 7628 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118382  118139  0 11:25 ?        00:00:00 /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 7694 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118613  116499  0 11:29 pts/3    00:00:00 grep --color=auto firefox
user@oberon ~$ 
user@oberon ~$ 
user@oberon ~$ pkill firefox
user@oberon ~$ ps -ef | grep firefox
user      118139    1011  1 11:25 ?        00:00:04 /usr/lib/firefox/firefox
user      118238  118139  3 11:25 ?        00:00:08 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118292  118139  0 11:25 ?        00:00:01 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 6792 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118335  118139  0 11:25 ?        00:00:00 /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 7628 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118382  118139  0 11:25 ?        00:00:00 /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 7694 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118632  116499  0 11:29 pts/3    00:00:00 grep --color=auto firefox
user@oberon ~$ 
user@oberon ~$ 
user@oberon ~$ pkill /usr/lib/firefox/firefox
user@oberon ~$ ps -ef | grep /usr/lib/firefox/firefox
user      118139    1011  1 11:25 ?        00:00:04 /usr/lib/firefox/firefox
user      118238  118139  3 11:25 ?        00:00:09 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118292  118139  0 11:25 ?        00:00:01 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 6792 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118335  118139  0 11:25 ?        00:00:00 /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 7628 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118382  118139  0 11:25 ?        00:00:00 /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 7694 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118655  116499  0 11:29 pts/3    00:00:00 grep --color=auto /usr/lib/firefox/firefox
user@oberon ~$ 
user@oberon ~$ 
user@oberon ~$ killall firefox
firefox: no process found
user@oberon ~$ ps -ef | grep /usr/lib/firefox/firefox
user      118139    1011  1 11:25 ?        00:00:04 /usr/lib/firefox/firefox
user      118238  118139  2 11:25 ?        00:00:09 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118292  118139  0 11:25 ?        00:00:01 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 6792 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118335  118139  0 11:25 ?        00:00:00 /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 7628 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118382  118139  0 11:25 ?        00:00:00 /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 7694 -prefMapSize 229459 -parentBuildID 20200727193539 -appdir /usr/lib/firefox/browser 118139 true tab
user      118678  116499  0 11:30 pts/3    00:00:00 grep --color=auto /usr/lib/firefox/firefox
user@oberon ~$ 
user@oberon ~$ 
user@oberon ~$ killall /usr/lib/firefox/firefox
user@oberon ~$ ps -ef | grep /usr/lib/fi
user      118702  116499  0 11:30 pts/3    00:00:00 grep --color=auto /usr/lib/fi
user@oberon ~$ 

I have searched for mentions of this and playing around with regex and general pattern matching and came up short. What am I missing?

Thank you!

Edit1: Both pgrep firefox and pgrep ".*firefox" do not list a single process
Edit2: Now with code tags.
Edit3:

 user@oberon ~$ cat /etc/locale.gen | grep -v "^#"
en_US.UTF-8 UTF-8 

Last edited by ephemeral (2020-08-06 18:45:58)

Offline

#2 2020-08-06 18:41:21

Toad39
Member
Registered: 2020-07-06
Posts: 60

Re: Problems killing processes by name

Please use code tags for command output instead of quote tags.

Offline

#3 2020-08-06 20:29:33

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: Problems killing processes by name

I don't usually run Firefox, but have it installed, so I did a quick check. The answer seems obvious if you use "top" - there is no "firefox" listed. It's "MainThread" now. So passing in the "-f" flag will find it, or switch to using MainThread instead (not tested).

Edit: it's listed as a Bug

Last edited by twelveeighty (2020-08-06 20:31:40)

Offline

#4 2020-08-06 20:35:23

stingA0815
Member
From: Löffingen, Germany
Registered: 2016-04-21
Posts: 31

Re: Problems killing processes by name

be careful!

pkill -f firefox

Offline

#5 2020-08-06 21:12:23

ephemeral
Member
Registered: 2020-08-06
Posts: 4

Re: Problems killing processes by name

twelveeighty wrote:

I don't usually run Firefox, but have it installed, so I did a quick check. The answer seems obvious if you use "top" - there is no "firefox" listed. It's "MainThread" now. So passing in the "-f" flag will find it, or switch to using MainThread instead (not tested).

Edit: it's listed as a Bug


Ah, thanks. Did not notice the name change for the processes/threads. Silly me.

Offline

Board footer

Powered by FluxBB