forked from rebol/rebol
-
Notifications
You must be signed in to change notification settings - Fork 2
Launch
angerangel edited this page Mar 19, 2013
·
1 revision
LAUNCH script /args arg /wait
Runs a script as a separate process; return immediately.
LAUNCH is a function value.
- script -- The name of the script (file! string! none!)
-
/args
- arg -- Arguments to the script (string! block! none!)
- /wait -- Wait for the process to terminate
#SOURCE
launch: make function! [ [
{Runs a script as a separate process; return immediately.}
script [file! string! none!] "The name of the script"
/args arg [string! block! none!] "Arguments to the script"
/wait "Wait for the process to terminate"
/local exe
][
if file? script [script: to-local-file clean-path script]
exe: to-local-file system/options/boot
args: to-string reduce [{"} exe {" "} script {" }]
if arg [append args arg]
either wait [call/wait args] [call args]
] ]