
Revision history for Perl extension Data::Tools::Process

1.63 2026.12.05

   - Data::Tools::Process::Forks forks_setup_signals( $timeout ): the
     INT/TERM handler no longer waits forever for children which ignore
     TERM: it waits up to $timeout seconds (default 5), sends KILL to the
     rest and waits again, then exits 111; further signals are ignored while
     it runs. CHLD is set to DEFAULT. QUIT is not handled on purpose, it
     stays an emergency stop (Ctrl-\), while Ctrl-C (INT) is graceful
   - Data::Tools::Process::Forks API changed, not compatible with earlier
     versions:
     - forks_set_max() and forks_get_max() removed, the maximum is the 2nd
       argument of forks_start_one( $name, $max, $coderef, @args ): undef
       is 8, -1 is the machine core count (read once and cached), other
       values below 1 do not fork and return '0E0'
     - forks_wait_one() removed: every child reaped by the module is
       recorded in a list of exits, returned by the new forks_exits() as an
       array reference of [ $pid, $exit, $signal, $name ], oldest first; the
       list belongs to the caller, who reads and clears it
     - added forks_set_exits_max( $max ): keep only the last $max exits, 0
       disables recording, undef unlimited (default)
     - added forks_wait_few( $non_blocking ): reaps the children which
       already exited (or blocks for the first one) and returns their count
     - added forks_wait_count( $count, $timeout ): waits until at most
       $count forks run; forks_wait_all( $timeout ) is the same with 0
     - forks_names() returns a hash reference of name => count of running
       forks
     - forks_reset_state() clears only the tracked forks and the exits list,
       settings are kept (and inherited by forked children)
   - Data::Tools::Process::Forks waits without timeout return when the
     process has no children left (a tracked child was reaped elsewhere)
     instead of looping forever
   - Data::Tools::Process::Forks forks_start_one() waits for a free slot
     with the timeout set by forks_set_start_wait_to() (default 0, wait
     without timeout). when the timeout is reached it returns '0E0': the
     job was not started and must be retried, the timeout only gives
     control back to the caller for a while
   - Data::Tools::Process :all and :none import tags (used in the SYNOPSIS)
     are defined now, before "use Data::Tools::Process qw( :all )" died
   - Makefile.PL requires perl 5.010 (the modules use //)
   - t/ install test loads all modules and checks the functions which do
     not fork
   - Data::Tools::Process pidfile_create( STALE_CHECK => 1 ) no longer takes
     over the pid file of a running process of another user (kill() fails
     with EPERM), and never takes over a pid file which cannot be read
     (returns -1)
   - t/ install tests do not fork, the forking parts of t/t1 moved to
     tt/t1-data-tools-process-fork.pl
   - tt/ and xt/ tests are in MANIFEST now, they skip themselves when run
     by CPAN clients or automated testing (only t/ runs on install)

1.62 2026.12.04

   - Data::Tools::Process::ForkPool added fpool_pids( $pool ), returns the
     list of pids of the pool's processes (count in scalar context)
   - fpool_pids() tests in tt/
   - Data::Tools::Process::ForkPool added fpool_discard( $pool, $immediate ),
     removes a pool: waits for all its processes to exit and reaps them
     first, unless $immediate is non-zero
   - Data::Tools::Process::ForkPool fpool_count() and fpool_busy_count()
     return 0 for a pool without processes (was undef)
   - Data::Tools::Process pidfile_create() takes an exclusive flock() on
     "$pid_file_name.lock" while it checks, removes a stale and creates the
     pid file, so two processes can no longer both take over the same stale
     pid file. the .lock file is left in place
   - Data::Tools::Process::Forks forks_start_one() with a sub: if the sub
     dies, the child exits with 255 (the error is not printed), it no longer
     returns into the parent's code (and could fork further)

1.61 2026.11.27

   - Data::Tools::Process added path_gone( $path ) and cwd_gone(), check if
     a path or the current directory was removed (or is no longer
     accessible on a network file system)
   - Data::Tools::Process::ForkPool fpool_wait_all( $pool, $timeout ) got
     optional timeout in seconds: waits up to it for all processes of the
     pool to exit, returns as soon as the pool is empty
   - path_gone() and cwd_gone() tests in t/, fpool_wait_all() timeout tests
     in tt/

1.60 (pending)

   - first Data-Tools-Process release: Data::Tools::Process,
     Data::Tools::Process::Forks and Data::Tools::Process::ForkPool split
     from Data::Tools 1.52, module names did not change; earlier history is
     in Data::Tools Changes. the changes since Data::Tools 1.52 follow
   - Data::Tools::Process added daemonize_here(), same as daemonize() but
     stays in the current directory, daemonize() options documented
     (CHDIR, UMASK, STDOUT, STDERR, CLOSE_ALL_FDS)
   - added Data::Tools::Process::ForkPool, pools of forked worker processes
     (process groups) with messages to/from the workers over socket pairs
     (Net::Tools::Socket::Pair), requires Net::Tools and Exception::Sink;
     fpool_fork_one() creates the pool if needed, fpool_wait_one() returns
     ( $pid, $exit, $signal, $status ) in list context ($status is the raw
     wait status)
   - fork tests moved to tt/
