killmesoftly icon indicating copy to clipboard operation
killmesoftly copied to clipboard

Partial matching of command line

Open rochacbruno opened this issue 9 years ago • 1 comments

in one shell do

$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...

in another shell

$ ./kmsn SimpleHTTPServer
No process matches given pattern SimpleHTTPServer

while

$ ps aux | grep SimpleHTTPServer
rochacb+  6270  0.1  0.0  43340 12660 pts/16   S+   17:16   0:00 python -m SimpleHTTPServer

but it works if I do

$ ./kmsn python -m SimpleHTTPServer

Can't work with partial matching?

rochacbruno avatar Dec 17 '14 19:12 rochacbruno

hello, the latter works because you're killing python, actually.

The process matching actually happens on the process name AFAIK, not on the parameters.

There's an option in pgrep (-f) that allows matching on the full command line. I might think about exposing it as a parameter.

alanfranz avatar Dec 17 '14 21:12 alanfranz