SYNCHRONISATION.SH(1)
π SYNCHRONISATION.SH(1) π
okay so bestie, welcome to this page from the User Contributed Perl Documentation β it's giving process-sync main character energy, and honestly? obsessed. π¦ This is where BeakerLib keeps its helpers for making processes wait for each other instead of chaos-spiraling. no cap.
β¨ NAME β¨
BeakerLib - synchronisation - Process synchronisation routines
πΈ DESCRIPTION πΈ
This is a library of helpers for process synchronisation of applications. π
NOTE: none of these commands will cause the test proper to fail, even in case of critical errors during their invocation. If you want your test to fail if these fail, use their return codes and rlFail(). π«Ά
π₯ FUNCTIONS π₯
π Process Synchronisation π
π« rlWaitForCmd
Pauses script execution until command exit status is the expected value. Logs a WARNING and returns 1 if the command didn't exit successfully before timeout elapsed or a maximum number of invocations has been reached. π
rlWaitForCmd command [-p PID] [-t time] [-m count] [-d delay] [-r retval]
commandβ Command that will be executed until its return code is equal 0 or the value specified as option to-r. π-t timeβ Timeout in seconds, default=120. If the command doesn't return 0 before time elapses, the command will be killed. π-p PIDβ PID of the process that should also be running. If the process exits before the command exits with the expected exit code, the return code will be set to 1.-m countβ Maximum number ofcommandexecutions before continuing anyway. Default is infinite. Returns 1 if the maximum was reached.-d delayβ Delay betweencommandinvocations. Default 1.-r retvalβ Expected return value of command. Default 0.
π« rlWaitForFile
Pauses script execution until specified file or directory starts existing. Returns 0 if file started existing, 1 if timeout was reached or PID exited. Return code is greater than 1 in case of error. π
rlWaitForFile path [-p PID] [-t time] [-d delay]
pathβ Path to file that should start existing.-t timeβ Timeout in seconds (optional, default=120). If the file isn't opened before the time elapses the command returns 1.-p PIDβ PID of the process that should also be running. If the process exits before the file is created, the command returns with status code of 1.-d delayβ Delay between subsequent checks for existence of file. Default 1.
π« rlWaitForSocket
Pauses script execution until local socket starts listening. Returns 0 if socket started listening, 1 if timeout was reached or PID exited. Return code is greater than 1 in case of error. π
rlWaitForSocket {port|path} [-p PID] [-t time] [-d delay] [--close] [--remote]
port|pathβ Network port to wait for opening or a path to UNIX socket. Regular expressions are also supported.-t timeβ Timeout in seconds (optional, default=120). If the socket isn't opened before the time elapses the command returns 1.-p PIDβ PID of the process that should also be running. If the process exits before the socket is opened, the command returns with status code of 1.-d delayβ Delay between subsequent checks for availability of socket. Default 1.--closeβ Wait for the socket to stop listening.--remoteβ Wait for the remote socket to start listening instead of local one.
π« rlWait
Wrapper around bash builtin wait command. See bash_builtins(1) man page. Kills the process and all its children if the timeout elapses. π€
rlWait [n ...] [-s SIGNAL] [-t time]
nβ List of PIDs to wait for. They need to be background tasks of current shell. Seebash_builtins(1)section forwaitcommand.-t timeβ Timeout in seconds (optional, default=30). If the wait isn't successful before the time elapses then all specified tasks are killed.-s SIGNALβ Signal used to kill the process, optionalSIGTERMby default.
π AUTHORS π
- Hubert Kario
<hkario@redhat.com>
mwah π and that's the whole page, bestie! footer deets: perl v5.32.1, dated 2026-04-07, manual name SYNCHRONISATION.SH(1). periodt. π
π¦ where this page comes from
- epel 9: beakerlib 1.33.3-1.el9 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms