SNOBOL4FORK(3)

πŸ“¦
version 2.3.1 Β· 3 versions
, in fedora 43, fedora 44, opensuse-leap 16.0

πŸ’– SNOBOL4FORK(3) πŸ’–

okay so bestie, this is a page from the CSNOBOL4 Manual and it's literally all about forking processes with SNOBOL4. like, POSIX fork energy but make it SNOBOL. sit down, hydrate, we're doing this 🫢

🌸 NAME 🌸

snobol4fork β€” POSIX fork for SNOBOL4

no cap, that's the whole name section. short king.


✨ SYNOPSYS ✨

    -INCLUDE 'fork.sno'

            pid = FORK()

            status = WAITPID([pid][,options])

            pid = GETPID()

            parent = GETPPID()

look at that. immaculate. 🀌


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜•

FORK() creates a process β€” and it's giving split personality in the best way, because it returns 0 in the child and the process ID in the parent. yes, one function, two whole realities. main character energy fr fr.

WAITPID() takes an optional process id to wait for, and returns a string with the process id, the status, and additional status about the child. so you get the whole lore back, not just a vibe check. πŸ’…

options is a string of optional flags β€” and for the full deets you gotta peek at the waitpid(2) man page. the flags are:

  • c β€” WCONTINUED
  • h β€” WNOHANG
  • t β€” WTRAPPED
  • u β€” WUNTRACED
  • w β€” NOWAIT

five little letters, five big responsibilities. πŸŽ€

GETPID() returns the current process ID. it never fails. iconic behaviour, honestly, we love a function with zero drama. πŸ‘‘

GETPPID() returns the parent process ID. it also never fails. mother is mothering. 🌸


🌈 SEE ALSO 🌈

snobol4(1), fork(2), waitpid(2), getpid(2), getppid(2)

the whole friend group, all linked up πŸ’œ


πŸŽ€ AUTHOR πŸŽ€

Philip L. Budne


that's the whole page, bestie, you ate it. this was CSNOBOL4B 2.3.1, dated March 31, 2022 β€” so yes it's vintage but it's still slaying, periodt. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from