Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Sep 2014, 02:11
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
About yad [SOLVED]
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [20 Posts]   Goto page: Previous 1, 2
Author Message
mikeb


Joined: 23 Nov 2006
Posts: 8252

PostPosted: Fri 11 Oct 2013, 09:08    Post subject:  

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
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1826
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Fri 11 Oct 2013, 12:05    Post subject:  

Thank you mikeb!
_________________


Last edited by Argolance on Fri 11 Oct 2013, 12:59; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
Argolance


Joined: 06 Jan 2008
Posts: 1826
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Fri 11 Oct 2013, 12:19    Post subject:  

I finally kept my solution and "pruned it away": this is very simple and seems to work fine: Cool
Code:
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.

_________________

Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 8252

PostPosted: Fri 11 Oct 2013, 13:34    Post subject:  

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
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1826
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Tue 22 Oct 2013, 09:42    Post subject:  

Bonjour,
To dowload the latest 0.23.1 yad version: Arrow http://www.murga-linux.com/puppy/viewtopic.php?t=58306&start=60

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 2 [20 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0483s ][ Queries: 13 (0.0046s) ][ GZIP on ]