[Tutor] finally without try or except
Hugo Arts
hugo.yoshi at gmail.com
Tue Jul 31 17:49:22 CEST 2012
On Tue, Jul 31, 2012 at 5:23 PM, Prasad, Ramit <ramit.prasad at jpmorgan.com>wrote:
> [snip]
>
> > >> This will be the most robust as it will
> > >> also work for cases where the program is terminated without the use of
> > >> the keyboard (i.e. kill -9, task manager, computer reboot, etc.) but
> >
> > That unfortunately is not so. kill -9 does *not* send a signal or raise
> an
> > exception. It just kills the process dead, instantly and without warning.
>
> Does a plain kill send a signal or do you need to use an option
> like SIGHUP?
>
>
kill is supposed to always send a signal. Without options it will send the
process SIGTERM, which indicates to the process it should terminate. kill
-9 sends SIGKILL, which is kind of special since it is a signal that never
really arrives at the process itself. When the kernel notices the SIGKILL
it will just kill the process.
Hugo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120731/04ae1c93/attachment.html>
More information about the Tutor
mailing list