in reply to need a reliable way to "sleep" while using signals

Four-arg select returns -1 if it is interrupted, 0 if timed out. Using that and Time::HiRes, here's a demo,

#!/usr/bin/perl # file: sigdemo use warnings; use strict; use Time::HiRes qw/gettimeofday tv_interval/; $SIG{INT} = sub {}; my $timer = shift; my $start = [gettimeofday]; { last if $timer <= 0; $timer -= tv_interval($start), redo if select undef, undef, undef, $timer; } print "*Yawn* what time is it?\n";
(Untested, no AIX here). That is meant to sleep through Ctrl-C keyboard interrupts for X seconds given on the command line.

After Compline,
Zaxo