About yad [SOLVED]

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
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#16 Post by mikeb »

If i follow the need correctly you need a unique identifier for one particular yad process but outside of a script.

One approach I had was to make a unique sysmlink to say yad in /tmp...eg /tmp/yad-myscript

then launch your yad from /tmp/yad-myscript ... this then appears in such as pidof or ps as a unique running process thats easy to kill independantly.

Think in terms of mplayer and gmplayer...

mike

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#17 Post by Argolance »

Thank you mikeb!
Last edited by Argolance on Fri 11 Oct 2013, 16:59, edited 1 time in total.

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#18 Post by Argolance »

I finally kept my solution and "pruned it away": this is very simple and seems to work fine: 8)

Code: Select all

KillYad(){
		YAD_PID=`ps | grep yad | grep -w POSou | cut -d" " -f 1`
		kill -15 $YAD_PID
But, is there any contraindication to use it or something to add to make it better?

Cordialement.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#19 Post by mikeb »

No thats how I would normally do it if using $! was not possible

the create a tmp link is handy if say you had several yads running from multiple scripts that may no longer exist eg usin exec or &

mike

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#20 Post by Argolance »

Bonjour,
To dowload the latest 0.23.1 yad version: :arrow: http://www.murga-linux.com/puppy/viewto ... 6&start=60

Cordialement.

Post Reply