C
C
chelius_ua2016-08-22 12:02:38
Perl
chelius_ua, 2016-08-22 12:02:38

SIGINT on session termination?

Good afternoon
I use $SIG{'INT'} to catch the script stopping by ctrl+c
And you can somehow catch the script stopping for example:
1. when closing the window with putty
2. if it is killed by kill
Thank you

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pcdesign, 2016-08-22
@chelius_ua

can be tracked.

use strict;
use warnings;
use sigtrap qw/die normal-signals/;

sleep(200);

When I kill a program with cntr-c I get:
When I kill with kill pid I get this:
When I close ssh in Putty:
Here is an article on the subject:
perltricks.com/article/37/2013/8/18/Catch-and -Hand...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question