Proc-Forking

 view release on metacpan or  search on metacpan

Changelog  view on Meta::CPAN

put the name of process already running in error message

----------------------------
Revision : 1.7 Date : 2004/8/11 13:2:39

correct pid_file management for the daemon

----------------------------
Revision : 1.6 Date : 2004/8/11 10:39:7

chown on PID of daemon
remove daemon PID when kill

----------------------------
Revision : 1.5 Date : 2004/8/11 9:6:28

add test_name, test_pid, clean_childs function

----------------------------
Revision : 1.4 Date : 2004/8/6 9:58:22
correct format of version

Forking.pm  view on Meta::CPAN

    my $luid = -1;
    my $lgid = -1;
    if ( $uid ne '' )
    {
        $luid = $uid;
    }
    if ( $gid ne '' )
    {
        $lgid = $gid;
    }
    chown $luid, $lgid, $pid_file;
    if ( $home ne '' )
    {
        local ( $>, $< ) = ( $<, $> );
        my $cwd = $home;
        chdir( $cwd )  || return ( $CODE[11][0], 0, $CODE[11][1] );
        chroot( $cwd ) || return ( $CODE[12][0], 0, $CODE[12][1] );
        $< = $>;
    }

    if ( $gid ne '' )



( run in 1.314 second using v1.01-cache-2.11-cpan-5511b514fd6 )