TIMED-PROCESS(1)
π TIMED-PROCESS(1) β the perl section of the manual, bestie π
okay so real talk, this one lives in the User Contributed Perl Documentation corner of the man pages, and honestly? she's giving "small script, big main character energy." π
β¨ NAME β¨
timed-process β run a background process for a limited amount of time β³π
Like, you give it a time limit and it will hold your little command to it. no cap.
π¦ SYNOPSIS π¦
timed-process [-e exit_status] timeout command [<arg> [<arg> ...]]
ok so it's timed-process, then optionally -e exit_status, then your timeout, then the command, then however many <arg>s you wanna pass along. the way that syntax just flows π«Ά
πΈ DESCRIPTION πΈ
so here's the tea, bestie: this script runs command for a specified amount of time, and if it doesn't finish? it kills the process. periodt. πβ¨
if command runs and exits before the given timeout, timed-process returns the exit value of command. slay, normal behavior, love that for you.
but if command did not exit before timeout seconds, then timed-process will kill the process and return an exit value of 255 β unless the -e command line option is set, which instructs timed-process to return a different exit value instead. π₯
ngl this is the whole point: it lets the user oftimed-processfigure out whether the process ended normally or was straight-up killed. exit255= "bestie got got." π
π§ a lil sign-off π
this icon of a man page is brought to you by perl v5.42.3, dated 2023-04-22 β written in the TIMED-PROCESS(1) era and honestly she ate. ππ
π¦ where this page comes from
- nixos 26.05: perl5.42.3-Proc-Background 1.32
- nixpkgs unstable: perl5.42.3-Proc-Background 1.32
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms