summaryrefslogtreecommitdiff
path: root/t/sleep_exit.pl
blob: b1f5d90a2716a5fe3bf8ddd045c201ebab152b78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use strict;

$| = 1;

# Debian-specific modification: some automatic building tools
# (sbuild) set $SIG{HUP} = 'IGNORE'. Temporarily override that.

local $SIG{HUP} = 'DEFAULT';

my ($sleep, $exit_status) = @ARGV;
$sleep       = 1 unless defined $sleep;
$exit_status = 0 unless defined $exit_status;

if ($ENV{VERBOSE}) {
  print STDERR "$0: sleep $sleep and exit $exit_status.\n";
}

sleep $sleep;

if ($ENV{VERBOSE}) {
  print STDERR "$0 now exiting.\n";
}

exit $exit_status;