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 Mon 20 Oct 2014, 22:15
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How to gracefully close program without using wmctrl?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 424
Location: Japan

PostPosted: Mon 16 Jun 2014, 09:16    Post subject:  How to gracefully close program without using wmctrl?  

Wmctrl has the ability to close programs gracefully. When a program, e.g. geany, hasn't yet saved its data, the program will show a dialog and offer to save the data before finally closing.

This seems to be simple task and I was hoping that this can be done wiith a standard command line tool, without relying on wmctrl, but using kill or pkill with various signals will either kill immediately or not at all. Any ideas?
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4254
Location: Gatineau (Qc), Canada

PostPosted: Mon 16 Jun 2014, 10:43    Post subject:  

Anything wrong with wmctrl?
_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2257

PostPosted: Mon 16 Jun 2014, 12:44    Post subject:  

run 'kill -l' to see a list of the signals which can be sent. SIGINT is probably what you want. After that settles, you then use kill -9 or kill -15.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 424
Location: Japan

PostPosted: Mon 16 Jun 2014, 22:10    Post subject:  

amigo wrote:
SIGINT is probably what you want. After that settles, you then use kill -9 or kill -15.
I wrote:
using kill or pkill with various signals will either kill immediately or not at all.
Nope. That's why I'm so puzzled. I've tried them all.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
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.0428s ][ Queries: 12 (0.0043s) ][ GZIP on ]