The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 07:28 AM
any way to close socket pa.chidhambaram UNIX and Linux Applications 3 02-01-2008 10:12 AM
ftp - Connection close kaibiganmi UNIX for Dummies Questions & Answers 3 12-14-2007 02:30 PM
Close Socket at HP-UX Renato Gregio HP-UX 2 08-14-2007 10:04 AM
When kill doesnt work, how to kill a process ? VijayHegde UNIX for Advanced & Expert Users 3 05-12-2006 04:24 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-27-2007
Tártaro Tártaro is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 18
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 10:42 AM..
  #2 (permalink)  
Old 03-27-2007
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,847
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 11:37 AM..
  #3 (permalink)  
Old 03-28-2007
bigearsbilly bigearsbilly is offline
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:42 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0