add subprocess cmd
This commit is contained in:
parent
19fe403eb3
commit
9174ba0dd8
1 changed files with 9 additions and 0 deletions
|
@ -830,6 +830,15 @@ public class ISBPL {
|
|||
((ISBPLCallable) o.object).call(stack);
|
||||
};
|
||||
break;
|
||||
case "subprocess":
|
||||
func = (Stack<ISBPLObject> stack) -> {
|
||||
try {
|
||||
Runtime.getRuntime().exec(toJavaString(stack.pop()));
|
||||
} catch(IOException e) {
|
||||
throw new ISBPLError("IO", "Couldn't start process");
|
||||
}
|
||||
};
|
||||
break;
|
||||
default:
|
||||
func = natives.get(name);
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue