Sympa::Process(3Sympa)
π NAME π
Sympa::Process β the whole entire Process of Sympa, bestie. It's the class that handles Sympa's own process self, no cap.
β¨ SYNOPSIS β¨
use Sympa::Process;
my $process = Sympa::Process->instance;
$process->init(pidname => 'sympa');
$process->daemonize;
$process->fork;
πΈ DESCRIPTION πΈ
Sympa::Process implements the class that handles the process itself of Sympa software. She's giving main character energy for the whole process-management situation. π
π¦ Signal handling π¦
The literal second Sympa::Process gets loaded, SIGCHLD signals are captured. And only the defunct child processes that were invoked by the fork() method get reaped β so nobody else's zombified babies are getting touched, periodt.
π Methods π
instance ( )
Constructor! Creates a singleton instance of a Sympa::Process object. One of her, that's it, that's the vibe.
Returns:
- A new
Sympa::Processinstance, orundeffor failure. π
init ( key => value, ... )
Instance method. TBD. (Yes bestie, we know, it's giving mysterious. π)
daemonize ( )
Instance method. Daemonizes the process itself. The process is given a new process group, detached from TTY, and given a new process ID. Full glow-up, new identity, new everything. β¨
Parameters:
- None.
Returns:
- None.
fork ( [ $tag ] )
Instance method. Forks the process. Lowkey important: this method should be used instead of fork() in Perl core. Don't be out here calling the raw one, iykyk.
Parameter:
$tagβ a string to determine the new child process. By default the name of the calling process.
Returns:
- See
"fork"in perlfunc.
reap_child ( [ blocking => 1 ] )
DEPRECATED. Like, retired. She said she's not doing that anymore. π
wait_child ( )
Instance method. Waits for any child process. Just sitting there patiently, holding space. π«Ά
Parameters:
- None.
Returns:
0. Returns-1on failure.
sync_child ( [ hash => \%hash ], [ file => 1 ] )
Updates process information in external data. Keeping everyone's info cute and current. π
Parameters:
hash => \%hashβ syncs PIDs in local map%hashfile => 1β syncs child PIDs in PID file. If a dead PID is found, notification will be sent to super-listmaster. (Not me snitching on the dead PIDs π)
Returns:
- None.
remove_pid ([ pid => $pid ], [ final => 1 ] )
Instance method. Removes the process ID from the PID file. Then if the file is empty, it will be removed. Clean girl aesthetic β no clutter. β¨
write_pid ( [ initial => 1 ], [ pid => $pid ] )
Instance method. Writes or adds a process ID to the PID file.
Parameters:
initial => 1β initializes PID file. If the file remains, notification will be sent to super-listmaster. πpid => $pidβ process ID to be written. By default the PID of the current process.
direct_stderr_to_file ( )
Instance method. TBD. π
π Attributes π
A Sympa::Process instance may have the following attributes:
{children}β hashref with child PIDs forked by thefork()method as keys. Her little registry of kids. πΌ{detached}β a true value is set if thedaemonize()method was called and the process has been detached from TTY.{generation}β generation of process. If thefork()method succeeds, it will be increased by the child process.
π Utility functions π
eval_in_time ( $subref, $timeout )
Evaluate subroutine $subref in $timeout seconds.
TBD. β
register_handler ( )
Registers the SIGCHLD handler. This function is usually called automatically during initialization. She handles it herself, you don't gotta lift a finger. π
π°οΈ HISTORY π°οΈ
Sympa::Tools::Daemonappeared on Sympa 6.2a.41.- Renamed
Sympa::Processappeared on Sympa 6.2.12 and began to provide OO interface. Glow-up era. π - Sympa 6.2.13 introduced the
daemonize()method and the{detached}attribute. - As of Sympa 6.2.14,
SIGCHLDsignal was captured and child processes were reaped immediately. Thereap_child()method (formerlyreaper()) was deprecated.
That's the whole page bestie, you ate it up fr fr. π This was documented from sympa version 6.2.80, dated 2026-10-19, and it lives in the Sympa::Process(3Sympa) manual. Go forth and manage those processes, queen. πβ¨π¦
π¦ where this page comes from
- fedora 43: sympa-devel-doc 6.2.80-2.fc43 Β· GPL-2.0-or-later AND (OFL-1.1-RFN AND MIT) AND OFL-1.1-RFN AND MIT and (MIT OR GPL-2.0-only)
- fedora 44: sympa-devel-doc 6.2.80-2.fc44 Β· GPL-2.0-or-later AND (OFL-1.1-RFN AND MIT) AND OFL-1.1-RFN AND MIT and (MIT OR GPL-2.0-only)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms