interplane.Get Omega
Read in your language

omega-mcp

aien-dev/omega-mcp

Brought by drakestapleton

branch main Branches Tags History

omega-mcp / data / examples / procs.om

33 lines · 569 bytes Raw Blame History
1note fork, wait, signals, pipes, dup, process groups and sessions, and a failed execprog
2global st uchar 4
3global ends uchar 8
4fn ck yes bool to void
5if not yes
6exit 80
7end
8end
9fn main to int
10ck eq pipefds ends 0 8 0 0
11p = fork
12if eq p 0
13exit 7
14end
15ck gt p 0
16ck eq waitpid int p st 0 4 0 p
17ck eq get st 1 7
18ck eq killpid int getpid 0 0
19ck ge getppid 0
20ck ge getpgid 0 0
21ck ge getsid 0 0
22r = setpgid 0 0
23s = setsid
24ck eq dupfd 1 9 0 9
25x = new uchar 6 0
26put x 0 1
27put x 2 2
28put x 4 47
29put x 5 120
30ck eq execprog x 0 6 neg long 2
31ck eq execpure x 0 6 neg long 2
32ret 0
33end