NAME
Linux::FD::Pid - PID file descriptors
VERSION
version 0.003
SYNOPSIS
use Linux::FD::Pid
my $fh = Linux::FD::Pid->new($pid)
METHODS
new($pid)
This creates a pidfd file descriptor that can be used to await the termination of a process. This provides an alternative to using SIGCHLD
, and has the advantage that the file descriptor may be monitored by select, poll, and epoll.
send($signo)
This sends a signal to the process.
wait($flags = WEXITED)
This waits for the process to end. It's only allowed to be child of the current process. It takes a flags argument like `waitpid`, the constants for this from the POSIX module can be used for this.
get_handle($fd)
This duplicates a handle from another process. Permission to duplicate another process's file descriptor is governed by a ptrace access mode PTRACE_MODE_ATTACH_REALCREDS
check.
AUTHOR
Leon Timmermans <leont@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2019 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.