SHTK_PROCESS_RUN(3)

πŸ“¦ version 1.7, in nixos 26.05, nixpkgs unstable

✨ shtk_process_run(3) ✨ β€” the library functions manual bestie πŸ’…

okay so this is the page for shtk_process_run(3) from the Library Functions Manual, and honestly? it's giving "run your command but make it safe" πŸŽ€


🌸 NAME 🌸

shtk_process_run β€” runs a command inside a controlled environment, no cap ✨

πŸ“š LIBRARY πŸ“š

shtk_import run

like, that's the import you need. periodt πŸ’œ

πŸ¦‹ SYNOPSIS πŸ¦‹

shtk_process_run [-t seconds] command [arg1 .. argN]

πŸ’– DESCRIPTION πŸ’–

okay so shtk_process_run executes the command you hand it β€” that's the command sitting at the front of the argument list, followed by however many args β€” and while it's doing that it logs stuff using the logging functions from shtk_cli(3). literally it logs two things: the invocation of the command, and its termination status. like a little paper trail, adorable 🫢

and optionally β€” optional, key word β€” shtk_process_run can enforce a maximum run time for the executed command. so if you pass -t, the executed command gets forcibly terminated with a KILL signal if its run time exceeds the seconds you gave. yeah. KILL. no chill. it's for its own good tho πŸ’€

🌈 RETURN VALUES 🌈

shtk_process_run returns the exit code of the executed command. unless β€” if a timeout was provided and the command timed out, then it returns 127. that's the whole vibe check 😭

πŸ‘€ SEE ALSO πŸ‘€

shtk(3), shtk_process(3)

go read those too bestie, iykyk πŸ¦‹

πŸŽ€ HISTORY πŸŽ€

shtk_process_run first appeared in shtk 1.0.

the -t flag showed up later, in shtk 1.5. iconic glow-up honestly πŸ‘‘


ngl the whole thing is very "i will run your command but i'm also timing it and i'm not afraid to use KILL" β€” main character energy fr fr πŸ”₯

k bye, this was the Debian build from November 7, 2014, mwah πŸ’‹

πŸ“¦ where this page comes from