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.
What about kill (kill -term)?
Quote from here
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