Child:...k::Proc(3pm)

πŸ“¦
version 0.013 Β· 5 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay bestie so Child::Link::Proc β€” it's the Proc object that the Child module uses. that's it. that's the whole vibe. it's a page from the User Contributed Perl Documentation collection, filed under Child::Link::Proc(3pm), and it's here to tell you everything your little process-link object can do πŸ¦‹


🌸 SEE ALSO 🌸

this class inherits from:

  • Child::Link

like, all of that good stuff is coming down the family tree to you, no cap 🌈


✨ METHODS ✨

here's the whole menu, babe, every single one of them, i'm not gatekeeping:

  • $bool = $proc->is_complete() β€” asks "are you done yet?" about the child, and it does not block. it just peeks. lowkey polite. it hands you back a boolean πŸ’…
  • $proc->wait() β€” actually sits there and waits until the child terminates, and then it cleans up whatever zombie process is left kicking around. this one blocks, so yes it will hold up your whole flow until the child clocks out 😭 but hey, no zombies. iconic behavior.
  • $proc->kill($SIG) β€” sends the $SIG signal to the child process. that's the move. 🫢
⚠️ NOTE: kill() is straight up unpredictable on windows β€” strawberry perl will send that kill signal to the parent as well as the child. so like, not just the child. the parent too. be aware, bestie πŸ’€
  • $proc->pid() β€” returns the process PID. the number. that's it. that's the whole function 🌟
  • $proc->exit_status() β€” it's gonna be undef unless the process has actually exited. once it has exited, you get the exit status, no cap.

Note: so when you call exit($N), the actual unix exit status is bit shifted with extra information added on top. exit_status() shifts that value back for you, bestie, so you don't have to do the math. which means exit_status() will return 2 when your child calls exit(2). but if you want the actual value that wait() assigned to $?, go look at unix_exit() instead. iykyk 🧚

  • $proc->unix_exit() β€” okay so same deal: when you call exit($N), the actual unix exit status gets bit shifted with extra information added. and if you want the actual value that was used in exit() inside the child β€” the real raw one β€” check out exit_status(). they're the two sides of the same coin, periodt πŸ‘‘

πŸ’œ HISTORY πŸ’œ

so most of this was actually part of Parallel::Runner, and it was built for use in the Fennec project. then Fennec started getting broken up into multiple parts, and this is one such part. glow up moment ✨


🌈 FENNEC PROJECT 🌈

this module is part of the Fennec project. see Fennec for more details. Fennec is a project to develop an extendable and powerful testing framework, and together all the tools that make up the Fennec framework provide a potent testing environment. that's the goal, and they ate πŸ’…

the tools provided by Fennec are also useful on their own, fr fr. sometimes a tool that got created for Fennec turns out to be useful outside the greater framework, and when that happens, those tools get turned into their own projects. and this is one such project. main character energy πŸŽ€

Fennec - The core framework

  • the primary Fennec project that ties them all together 🫢

πŸ‘‘ AUTHORS πŸ‘‘

Chad Granum β€” exodist7@gmail.com


Copyright (C) 2010 Chad Granum

Child is free software; Standard perl licence.

Child is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. (yes that's the real legal vibe, don't come for me πŸ™ˆ)


and that's the whole page, bestie πŸ¦‹ this was Child::Link::Proc(3pm) from perl v5.36.0, dated 2022-10-13 β€” go forth and wait on your children responsibly, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from