omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / seed / ng / front / runs / host-fork.om
| 1 | note Host-only admission/error path; no GPU or device opened. |
| 2 | text path "/dev/null" |
| 3 | fn main to int |
| 4 | a = new uchar 128 0 |
| 5 | b = new uchar 128 0 |
| 6 | r = fork |
| 7 | if eq r 0 |
| 8 | exit 0 |
| 9 | end |
| 10 | if lt r 0 |
| 11 | ret 1 |
| 12 | end |
| 13 | w = waitpid int r a 0 4 0 |
| 14 | if ne w r |
| 15 | ret 2 |
| 16 | end |
| 17 | if not ge r 0 |
| 18 | ret 1 |
| 19 | end |
| 20 | ret 0 |
| 21 | end |