File: test.pl

package info (click to toggle)
libapp-control-perl 1.02-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 64 kB
  • ctags: 11
  • sloc: perl: 281; makefile: 43
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 );
}