1
0
Fork 0
forked from fun/fun

Added EXIT opcode to make it possible to return exit codes to the shell. (0.21.4)

This commit is contained in:
Johannes Findeisen 2025-10-04 13:02:29 +02:00
commit 9ac42c6ed1
8 changed files with 96 additions and 5 deletions

View file

@ -157,7 +157,10 @@ typedef enum {
OP_SOCK_RECV, // pops maxlen, fd; returns data string ("" on EOF/error)
OP_SOCK_CLOSE, // pops fd; returns 1/0
OP_SOCK_UNIX_LISTEN, // pops backlog, path; returns listen fd (>0) or 0
OP_SOCK_UNIX_CONNECT // pops path; returns fd (>0) or 0
OP_SOCK_UNIX_CONNECT, // pops path; returns fd (>0) or 0
// process control
OP_EXIT // pops code (or uses operand) and terminates script with exit code
} OpCode;
typedef struct {