Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 5173f2ddbb9264db6f0ea20957de55e4 > files > 22

perl-IPC-Run-0.920.0-3.mga4.noarch.rpm

#!/usr/bin/perl -w

## An example of how to daemonize.  See the IPC::Run LIMITATIONS section for
## some reasons why this can be a bit dangerous.

use strict ;

use IPC::Run qw( run close_terminal ) ;

run(
   sub {
      # ... your code here ...
      sleep 15 ;
   },
   init => sub {
      close_terminal ;
      exit if fork ;
   }
) ;