Package Info

perl-Proc-Fork


Simple, intuitive interface to the fork() system call


Unspecified

This module provides an intuitive, Perl-ish way to write forking programs by letting you use blocks to illustrate which code section executes in which fork. The code for the parent, child, retry handler and error handler are grouped together in a "fork block". The clauses may appear in any order, but they must be consecutive (without any other statements in between).

All four clauses need not be specified. If the retry clause is omitted, only one fork will be attempted. If the error clause is omitted the program will die with a simple message if it can't retry. If the parent or child clause is omitted, the respective (parent or child) process will start execution after the final clause. So if one or the other only has to do some simple action, you need only specify that one. For example:

run_fork { child { exec '/bin/ls', '-l'; die "Couldn't exec ls: $!\n"; } };

If the code in any of the clauses does not die or exit, it will continue execution after the fork block.


License: Artistic-1.0 OR GPL-1.0-or-later
URL: https://metacpan.org/release/Proc-Fork

Categories

Releases

Package Version Update ID Released Package Hub Version Platforms Subpackages
0.808-bp155.1.4 info GA Release 2023-05-17 15 SP5
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Proc-Fork
0.806-bp154.1.14 info GA Release 2022-05-09 15 SP4
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Proc-Fork
0.804-bp153.1.12 info GA Release 2021-03-06 15 SP3
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Proc-Fork
0.804-bp152.3.12 info GA Release 2020-04-16 15 SP2
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Proc-Fork
0.804-bp151.3.1 info GA Release 2019-07-18 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Proc-Fork
0.804-bp151.2.10 info GA Release 2019-05-18 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Proc-Fork
0.804-bp150.2.4 info GA Release 2018-07-30 15
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Proc-Fork