SHTK_PROCESS_RUN(3)
β¨ 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 π
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
- nixos 26.05: shtk 1.7
- nixpkgs unstable: shtk 1.7
- Copyright 2014 Google Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms