BSD-Process

 view release on metacpan or  search on metacpan

Process.pm  view on Meta::CPAN

no doubt already have a routine named C<info>). Instead, it is
exportable under the name C<process_info>.

=item list, process_list

Returns an (unsorted) array of pids of all the running processes
on the system. Note: fleet-footed processes may have disappeared
between the time the snapshot is taken and the time the code
subsequently gets around to asking for more information about
them. On the other hand, getting this list is very fast. If you
want the set of current processes on the system decoded as
C<BSD::Process> objects, you should be looking at the C<all>
meta-constructor.

The routine C<list> is not exportable. It may be exported under
the name C<process_info>.

  my @pid = BSD::Process::list;
  for my $p (@pid) {
    my $proc =  BSD::Process::info($p);
    print "$p $proc->{ppid}\n"; # print each pid and its parent pid

Process.pm  view on Meta::CPAN


Epoch time of the creation of the process. B<F5+>

=item children_time, childtime

Amount of real time used by the children processes (if any) of the
process. B<F5+>

=item process_flags, flag

A bitmap of process flags (decoded in the following methods as 0
or 1).

=item posix_advisory_lock, advlock

Flag indicating whether the process holds a POSIX advisory lock. B<F5+>

=item has_controlling_terminal, controlt

Flag indicating whether the process has a controlling terminal (if
true, the terminal session id is stored in the C<tsid> attribute). B<F5+>

Process.pm  view on Meta::CPAN

=item controlling_tty_active, isctty

Flag indicating that the vnode of the controlling tty is active. B<F5+>

=item is_session_leader, issleader

Flag indicating that the process is a session leader. B<F5+>

=item process_status, stat

Numeric value indicating the status of the process, decoded via the
following attibutes. B<F5+>

=item is_being_forked, stat_1

Status indicates that the process is being forked. B<F5+>

=item is_runnable, stat_2

Status indicates the process is runnable. B<F5+>



( run in 0.229 second using v1.01-cache-2.11-cpan-26ccb49234f )