Pid(3)
π NAME π
okay so you're reading Pid(3), the Linux::Pid page from User Contributed Perl Documentation β and it's literally here to get the native PID and the PPID on Linux. π§β¨
π SYNOPSIS π
bestie, here's the whole vibe:
use Linux::Pid;
print Linux::Pid::getpid(), "\t", Linux::Pid::getppid(), "\n";
use Linux::Pid qw(getpid getppid);
print getpid(), "\t", getppid(), "\n";
πΈ DESCRIPTION πΈ
so why would anyone use a module to get the PID and the PPID of a process when there are the $$ variable and the getppid() builtin? and we're not even mentioning the equivalent POSIX::getpid() and POSIX::getppid() functions, okay? π
the tea β is this: it's useful on Linux, with multithreaded programs. Linux' C library, using the linux thread model, returns different values of the PID and the PPID from different threads. (other thread models such as NPTL don't have the same behaviour.) this module forces perl to call the underlying C functions getpid() and getppid(). slay. π
π AUTHOR π
Copyright (c) 2002-2007 Rafael Garcia-Suarez. All rights reserved. this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π«Ά
that's the page, bestie π β from perl v5.42.0, dated 2014-07-21, page Pid(3). bye! π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Linux-Pid 0.04-bp160.1.12 Β· Artistic-1.0 or GPL-2.0+
- opensuse-leap 16.0: perl-Linux-Pid 0.04-bp160.1.12 Β· Artistic-1.0 or GPL-2.0+
- opensuse-leap 16.0: perl-Linux-Pid 0.04-bp160.1.12 Β· Artistic-1.0 or GPL-2.0+
- opensuse-leap 16.0: perl-Linux-Pid 0.04-bp160.1.12 Β· Artistic-1.0 or GPL-2.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms