pkill not killing

20,070

From the pkill manpage:

The process name used for matching is limited to the 15 characters present in the output of /proc/pid/stat. Use the -f option to match against the complete command line, /proc/pid/cmdline.

So try

pkill -1 -f PirateRadio.py
Share:
20,070

Related videos on Youtube

j0h
Author by

j0h

been using Linux since 2005. Ubuntu since whenever edgy eft was new. Lucid Lynx Ubuntu was the best Ubuntu I have ever used.

Updated on September 18, 2022

Comments

  • j0h
    j0h over 1 year

    I have a Script named PirateRadio.py That I am writing a script for. I need to kill and reload the script. Possibly with the same PID. I thought SIGHUP was a sure thing. when i run #pkill -1 PirateRadio.py

    Nothing happens. Radio keeps on going. Ok, I tried #pkill -9 PirateRadio.py still nothing, radio keeps right on.

    ps aux | grep Pir
    root    987 45.7 10.8 1266088 433868 ?      Sl   Mar15 2728:13 /root/PirateRadio.py
    root    24924  0.0  0.0   4388   800 pts/0    S+   11:13   0:00 grep PirateRadio.py
    

    so then I tried #kill -s 1 987 nothing happens. #kill -s 1 987

    then, system hang. So I dont want that, i guess. So then I use: #kill -s 9 987

    which kills the script well enough. I’ve used pkill on my other desktops, What is going on here? where can I look to find out what pkill is or isn’t doing?

    I looked in dmesg, but saw no change after running pkill I saw no verbose option in pkill man pages..

  • fiatux
    fiatux about 10 years
    +1. You can verify with pgrep: pgrep -l PirateRadio.py versus pgrep -f -l PirateRadio.py