File: test.pl

package info (click to toggle)
libapp-control-perl 1.07-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 92 kB
  • sloc: perl: 281; makefile: 2
file content (13 lines) | stat: -rwxr-xr-x 236 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl

use sigtrap qw( handler hangup HUP );

sub hangup { warn "got HUP\n" }
my $pidfile = shift;
open( PID, ">$pidfile" ) or die "Can't create pidfile $pidfile\n";
print PID "$$\n";
close PID;
while( 1 )
{
    sleep( 1 );
}