1 use
-libs
: exec os
-errno
3 : (errno?
) ( errno false
// ... true
-- ... )
5 endcr
." CANNOT EXEC; ERROR: " os
:errno
-name type cr
12 os
:strarray
-envp
(errno?
)
13 os
:strarray
-finalize dup
>r os
:strarray
->array
14 \ r@ os
:strarray
-dump
.stack bye
16 os
:strarray
-init
(errno?
)
17 " /usr/bin/ls" os
:strarray
-push
(errno?
)
18 " -la" os
:strarray
-push
(errno?
)
19 os
:strarray
-finalize dup
>r os
:strarray
->array
20 \ r@ os
:strarray
-dump
.stack bye
24 r
> os
:strarray
-free r
> os
:strarray
-free
26 endcr
." CANNOT EXEC; ERROR: " os
:errno
-name type cr
31 ( os
:WEXITED
) 0 os
:wait ifnot
32 endcr
." CANNOT WAIT; ERROR: " os
:errno
-name type cr
36 ." WAIT CODE: 0x" dup
.hex8 cr
37 ." WTERMSIG: " dup os
:WTERMSIG
. cr
38 ." WEXITSTATUS: " dup os
:WEXITSTATUS
. cr