in reply to Re^2: Catching CTRL+ALT+DEL close event and take actions
in thread Catching WINDOW close event and take actions

CTRL-ALT-DEL is usually picked up by the Window Manager, or from console it is the reboot signal. A user cannot intercept that, see Control-Alt-Delete.

In general, a user process is not able to intercept the Control-Alt-Delete sequence.

Try this:

#!/usr/bin/perl use warnings; use strict; sub handler_universal { print "\ngot a signal $_[0]\n"; $SIG{$_[0]} = \&handler_universal; } my @nami = keys(%SIG); #foreach( @nami){ print "$_\t$SIG{$_}\n"; } while(1){ for my $namesig (@nami) {$SIG{$namesig} = \&handler_universal;} }

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^4: Catching CTRL+ALT+DEL close event and take actions
by Anonymous Monk on Sep 22, 2011 at 10:05 UTC

    I think he is talking about deleting a process using taskmanager, or using http://live.sysinternals.com/pskill.exe

    Like CTRL+ALT+DELETE, you can't trap this either

    It ends the process without signaling it (Ctrl+C sends a signal)