The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to close a post am_yadav Forum Support Area for Unregistered Users & Account Problems 1 02-04-2008 03:28 AM
any way to close socket pa.chidhambaram UNIX and Linux Applications 3 02-01-2008 06:12 AM
ftp - Connection close kaibiganmi UNIX for Dummies Questions & Answers 3 12-14-2007 10:30 AM
Close Socket at HP-UX Renato Gregio HP-UX 2 08-14-2007 07:04 AM
When kill doesnt work, how to kill a process ? VijayHegde UNIX for Advanced & Expert Users 3 05-12-2006 01:24 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-27-2007
Registered User
 

Join Date: Mar 2007
Posts: 6
how to close an .app without using Kill

I want to close an application but to kill it seems to me very rude.I want to let it do her things before closing.Any idea? Thanks.

Last edited by Tártaro; 03-27-2007 at 07:42 AM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-27-2007
radoulov's Avatar
addict
 

Join Date: Jan 2007
Location: Milan, Italy/Varna, Bulgaria
Posts: 1,432
Quote:
Originally Posted by Tártaro
I want to close an application but to kill it seems to me very rude.I want to let it do her things before closing.
What about kill (kill -term)?


Quote from here

Quote:
When killing a process or series of processes, it is common sense to start trying with the least dangerous signal, SIGTERM. That way, programs that care about an orderly shutdown get the chance to follow the procedures that they have been designed to execute when getting the SIGTERM signal, such as cleaning up and closing open files. If you send a SIGKILL to a process, you remove any chance for the process to do a tidy cleanup and shutdown, which might have unfortunate consequences.

Last edited by radoulov; 03-27-2007 at 08:37 AM.
Reply With Quote
  #3 (permalink)  
Old 03-28-2007
Registered User
 

Join Date: Feb 2006
Location: Southern England
Posts: 102
usually I do it in this order to give it a chance to
sort itself out,


kill -HUP pid
kill -TERM pid

it can react to the above in a controlled way.
last resort of course

kill -9 pid
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0