Skip to content

Commit aa5522b

Browse files
committed
Update run/shell design to match reality.
1 parent 990d526 commit aa5522b

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

S29-functions.pod

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,8 @@ signal at all, and is used to determine if processes are still running:
521521
=item shell
522522

523523

524-
multi shell ( $expression, :$cwd = $CWD, :%env = %*ENV --> Proc::Status )
525-
multi run ( *$cmd, *@args, :$cwd = $CWD, :%env = %*ENV --> Proc::Status )
524+
multi shell ( $expression, :$cwd = $CWD, :%env = %*ENV --> Proc )
525+
multi run ( *$cmd, *@args, :$cwd = $CWD, :%env = %*ENV --> Proc )
526526

527527
C<shell> and C<run> execute an external program, and return control to
528528
the caller once the program has exited.
@@ -535,19 +535,9 @@ positional arguments as command line arguments that are passed to the
535535
executable without any processing (except that it encodes Strings to buffers
536536
first, as does C<shell>).
537537

538-
The return value of either function is the exit status
539-
of the program, and can be evaluated in the following contexts:
540-
541-
Bool - True = success; False = failure
542-
Int - Exit status (per the .exit method)
543-
544-
Success is defined as returning an exit status of 0. Any other exit
545-
status returns False for failure.
546-
547-
See C<wait> for more detail on how the C<Proc::Status> object
548-
is used.
549-
550-
On failure to execute, the routines C<fail()>.
538+
Both return a C<Proc> object, which boolifies to C<True> if the program had
539+
a successful exit and C<False> otherwise. The C<status> method on a C<Proc>
540+
provides the exit code.
551541

552542
If you want to execute an external program asynchronously (as in, not waiting
553543
for it to be finished), you will need C<Proc::Async>, as specced in

0 commit comments

Comments
 (0)