On 11/8/25 1:16 AM, ToddAndMargo via perl6-users wrote:
You will note exitcode, command, pid are
included in the run's method declaration:


Here is the wording of such from my own documentation:

command:
The command method of the Proc class returns a list containing the
arguments that were passed when the Proc object was executed via
spawn, shell, or run. This method provides access to the original
command and its arguments used to invoke the external process.

pid:
The pid method of the Proc class in Raku returns the process ID
(PID) of the external process if it is available, or Nil if not. This
method is used to retrieve the PID value after a process has been
spawned or executed

:$exitcode
Note: this is missing from “run” the documentation, but is shown
          in the “Proc” documentation.
The exitcode method in Raku's Proc class returns the exit
code of an external process, or -1 if the process has not
yet exited.

This is the exist code from the program. It is the similar to
`$?` in bash.

The exit code -1073741510 (0xc000013a) is a Windows-specific
  error code that indicates an application was terminated
  abruptly during a logoff or shutdown sequence.

  Typical exist codes (it is dependent on the programmer
  what he sends) are:

  0: Success; the command executed without errors.

  1: A generic or catchall error, often used for unspecified failures
  such as a command not being able to perform its intended operation
  or encountering an unexpected issue.

  2: Indicates misuse of a shell builtin command, such as passing an
  invalid argument, or an issue like a non-existent file or directory
  requiring permissions.

  126: Denotes that a command or script cannot be executed, typically
  due to permission issues preventing execution, even if the file exists.

  127: Means the command was not found, which may occur due to a typo
  in the command name or because the executable is not in the system's
  PATH environment variable.


Reply via email to