Redex Redex - 7 months ago 34
Linux Question

How does pkill mask work?

If I have process named

and process named
running and I execute command
pkill raspvid
, does it kill both processes or only process which is named raspvid?

If pkill kills both processes is there any linux-command to do the perfect match?


pkill kills all processes that command pgrep lists with the same parameters. In your case it sends SIGTERM signal to both processes. The following command kills the exactly matching pattern only:

 pkill -x raspivid