=begin pod

=TITLE class Proc::Status

=SUBTITLE Status of a running process

    class Proc::Status { ... }

L<run()|/type/IO#sub run> and L<shell()|/type/IO#sub shell> return a
C<Proc::Status> object:

    my $status = run 'false';       # most UNIXes have a /bin/false
    say $status.exitcode;           # 1
    say $status.signal;             # 0  (which means: not killed by a signal)

=head1 Methods

=head2 method exitcode

    method exitcode(Proc::Status:D:) returns Int:D

Returns the numeric exit code from the program.

=head2 method signal

    method signal(Proc::Status:D:) returns Int:D

Returns the numeric signal which caused the program to terminate, or 0 if this
wasn't the case. You can compare that to elements of the C<Signal> enum, for
example:

    given $status {
        when Signal::SIGSEGV { say "Use a memory-safe language next time!" }
        when Signal::SIGPIPE { say "Pipe broken, call a plumber!"          }
    }

=head2 method pid

    method pid(Proc::Status:D:)

Returns the PID (process identifier) from the external program, or an
undefined value if that isn't known.

=end pod
