Does the "-x" option of busybox pkill really work?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Does the "-x" option of busybox pkill really work?

#1 Post by MochiMoppel »

According to the documentation pkill -x <processname> should terminated all processes with the exact name (not substring) <processname>.

This works for the full version of pgrep/pkill, but I can't make it work for the busybox implementation of pkill. Does this work for anybody or is it just me? :cry:
Following example code opens two dialogs. After 2sec the "Hello" dialog is supposed to close, but it doesn't:

Code: Select all

xmessage Hello & gxmessage World & sleep 2 ; busybox pkill -x xmessage

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#2 Post by perdido »

Hi MochiMoppel,

Window closed as expected in upup bionic 18.05
BusyBox v1.28.3

---------------------------

Did not work in precise 5.71
BusyBox v1.21.0
pkill is in the "currently defined functions" but did not close the box.

----------------

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#3 Post by MochiMoppel »

Thanks perdido,

seems to confirm that BusyBox v1.21.0 is broken.
I also tested pgrep and - no surprise - found that it doesn't work as well.

HerrBert
Posts: 152
Joined: Thu 03 Nov 2016, 15:11
Location: NRW, Germany

#4 Post by HerrBert »

Not sure, if it belongs here or if it's of any interest...

busybox fuser in busybox v1.23.1 (slacko 6.3.2) seems to be broken too.

found this because pup_event_frontend tries to use it in /usr/local/bin/drive_all (which becomes /root/.pup_event/drive_sda(something)/AppRun), but returns an error with the option -v -m, as in mentioned script, and just nothing with option -m, though there are open files and mounted sfs's from that mountpoint.

Also, busybox acpid doesn't recognize the LID switch on my (various) net-/notebooks (busybox v1.21.0 on slacko 5.7.0 and v1.23.1).

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#5 Post by MochiMoppel »

HerrBert wrote:busybox fuser in busybox v1.23.1 (slacko 6.3.2) seems to be broken too.
pkill -x in v1.23.1 works or does not work?

HerrBert
Posts: 152
Joined: Thu 03 Nov 2016, 15:11
Location: NRW, Germany

#6 Post by HerrBert »

MochiMoppel wrote:pkill -x in v1.23.1 works or does not work?
works

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#7 Post by MochiMoppel »

thanks

Post Reply