1
0
Fork 0
forked from fun/fun

Added proc_run() and system() for processes and added to stdlib as class. (0.16.6)

This commit is contained in:
Johannes Findeisen 2025-10-02 01:50:53 +02:00
commit 1ac163a01e
11 changed files with 253 additions and 17 deletions

View file

@ -115,6 +115,8 @@ typedef enum {
// OS
OP_ENV, // pops name string; pushes value string (or "")
OP_INPUT_LINE, // operand: 0=no prompt; 1=has prompt. Pops [prompt?]; pushes input string (no trailing newline)
OP_PROC_RUN, // pops command string; pushes map {"out": string, "code": int}
OP_PROC_SYSTEM, // pops command string; pushes exit code number
// Threads
OP_THREAD_SPAWN, // operand: 0=no args, 1=has args; pops [args?], fn; pushes thread id (int>0)