#!/usr/bin/perl -w use strict; use POSIX (); my $sigset = POSIX::SigSet->new(POSIX::SIGHUP); $SIG{HUP}=\&cleanup; sub cleanup{ print "ALRM!\n"; } while (1){ sleep 1; } I launch the program and open another terminal, in which I find through ps auxww | grep s.pl ps auxww | grep s.pl s.pl script id
Further I do kill 1 12345 - I send a sighup signal sighup my script to see how the signal handler will work in it
and in the first terminal the process ends, although I have to write ALRM! in my wish ALRM! on stdout
what to do? how to be? who is guilty?
kill 1 12345? no sign-before 1? and how you just init and the whole system with it does not kill .... - Mikekill -1 12345similar to -HUP - Mike