Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/host/tests/pgroup.om # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / host / tests / pgroup.om` 26 lines ยท 436 bytes Raw Blame History 1 note process groups: setsid succeeds or returns EPERM when already a leader; on success the new 2 note group id must be the pid. setpgid(0,0) may succeed or return EPERM depending on that state. 3 fn main to int 4 i = getpgid 0 5 if le i long 0 6 ret 1 7 end 8 s = setsid 9 if and lt s 0 ne s long -1 10 ret 2 11 end 12 q = getpgid 0 13 if le q long 0 14 ret 3 15 end 16 if ge s 0 17 if ne q getpid 18 ret 4 19 end 20 end 21 r = setpgid 0 0 22 if and ne r 0 ne r long -1 23 ret 5 24 end 25 ret 0 26 end