File Coverage

blib/lib/IPC/SafeFork.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 23 23 100.0


line stmt bran cond sub pod time code
1             package IPC::SafeFork;
2              
3 3     3   111890 use 5.008008;
  3         10  
  3         105  
4 3     3   15 use strict;
  3         8  
  3         92  
5 3     3   14 use warnings;
  3         11  
  3         107  
6              
7 3     3   17 use base qw( Exporter );
  3         3  
  3         470  
8 3     3   2743 use POSIX qw(sigprocmask SIG_SETMASK);
  3         21962  
  3         17  
9              
10             our %EXPORT_TAGS = ( 'all' => [ qw(
11             safe_fork fork
12             ) ] );
13              
14             our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
15              
16             our @EXPORT = qw( safe_fork );
17              
18             our $VERSION = '0.0100';
19              
20             require XSLoader;
21             XSLoader::load('IPC::SafeFork', $VERSION);
22              
23             our $MASKALL;
24              
25             sub safe_fork ()
26             {
27 2     2 1 2115 return xs_fork();
28             }
29              
30             *fork = \&safe_fork;
31              
32             1;
33             __END__