Linux-Event-Fork
view release on metacpan or search on metacpan
Changes
examples/01_webpage_download.pl
examples/12_fork_exit_object.pl
examples/13_fork_child_callback.pl
examples/14_fork_stdin_streaming.pl
examples/20_bounded_parallelism_with_drain.pl
examples/21_web_fetch_pool.pl
examples/22_timeout_kill.pl
examples/23_cancel_queued_by_tag.pl
examples/24_child_callback_exec.pl
examples/25_chunking_notes.pl
examples/90_stress_timeout_churn.pl
examples/91_stress_stdin_with_timeout.pl
examples/README.md
lib/Linux/Event/Fork.pm
LICENSE
Makefile.PL
MANIFEST This list of files
README.md
t/00-load.t
t/01-fork-exit-object.t
t/02-fork-child-callback.t
t/03-capture-overrides.t
t/04-child-failure.t
t/05-child-setup-options.t
t/06-stdin-streaming.t
t/07-tag.t
t/08-timeout.t
t/09-stdin-epipe.t
t/10-max-children-queue.t
t/11-drain.t
t/12-cancel-queued.t
t/13-object-api.t
t/14-introspection.t
t/15-max-children-runtime.t
META.yml Module YAML meta-data (added by MakeMaker)
examples/91_stress_stdin_with_timeout.pl view on Meta::CPAN
#!/usr/bin/env perl
use v5.36;
use strict;
use warnings;
use Linux::Event;
use Linux::Event::Fork;
# STRESS TEST: stdin streaming + timeout interaction
# This stresses:
# - backpressure-aware stdin streaming queue
# - timeout firing while stdin is still being written
# - teardown stability (timer cancel, watchers, fds) after EPIPE/SIGPIPE conditions
#
# Expected:
# - timeout fires
# - child exits (TERM handler)
# - parent does not hang on write watcher
# - loop stops cleanly and prints DONE summary
$| = 1; # autoflush
lib/Linux/Event/Fork.pm view on Meta::CPAN
I/O streams (stdout/stderr/stdin) with a L<Linux::Event> loop.
Features:
=over 4
=item *
Nonblocking stdout/stderr capture (chunk callbacks)
=item *
Optional streaming stdin (parent -> child)
=item *
Timeout support with optional escalation to SIGKILL
=item *
Bounded parallelism (max_children) with queueing
=item *
Drain callback when all work completes
lib/Linux/Event/Fork.pm view on Meta::CPAN
Force stderr capture on/off.
Default: true if C<on_stderr> is provided, otherwise false.
=item stdin => $string
If provided, writes this string to the child's stdin after start.
=item stdin_pipe => $bool
If true, keeps stdin open for streaming writes using the child handle.
If false (default), stdin is closed after the initial C<stdin> write (if any).
=item timeout => $seconds
Soft timeout. When it fires: calls C<on_timeout> (if any) and sends SIGTERM.
=item on_timeout => sub ($child) { ... }
Called in the parent when C<timeout> fires.
( run in 0.911 second using v1.01-cache-2.11-cpan-df04353d9ac )