processman(n)

πŸ“¦
version 2.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– processman(n) β€” the manual page, but make it a group chat πŸ’–

okay so bestie, you know processman(n)? yeah. that's the one. this whole page is about the processman manual, and it's genuinely one of those little Tcllib gems that just works. Pure Tcl. Platform-generic. Managing your child processes like the main character she is. no cap. 🫢


✨ NAME ✨

processman β€” a tool for automating the period callback of commands. yes that's the official vibe. periodt. πŸ’…


🌸 SYNOPSIS 🌸

package require Tcl 8.5 9

package require twapi 3.1

package require cron 1.1

package require processman ?0.8?

::processman::find_exe name

::processman::kill id

::processman::kill_all

::processman::killexe name

::processman::onexit id cmd

::processman::priority id level

::processman::process_list

::processman::process_list id

::processman::spawn id cmd args

like look at her. so organised. so clean. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

The processman package gives you a Pure-tcl set of utilities to manage child processes in a platform-generic nature. that's it. that's the whole pitch. she doesn't need to do more, she ate. πŸ”₯


πŸ‘‘ COMMANDS πŸ‘‘

::processman::find_exe name

locate an executable by the name of name in the system path. and on Windows? she's also adding the .exe extention if you didn't give it. (yes, "extention". that's how it's spelled in the original. we respect the original here. πŸ’–)

::processman::kill id

kill a child process id. simple. iconic. gone. πŸ’€

::processman::kill_all

kill all processes spawned by this program. like. every single one. bye besties πŸ‘‹βœ¨

::processman::killexe name

kill a process identified by the executable. here's where it gets platform-specific, so pay attention:

  • on Unix, this triggers a killall.
  • on Windows, twapi::get_process_ids is used to map a name to one or more IDs, which are then killed.

two paths, one goal. slay. πŸ¦‹

::processman::onexit id cmd

arrange to execute the script cmd when this programe detects that process id as terminated. (again β€” "programe". original spelling. we keep it. πŸ’œ)

::processman::priority id level

mark process id with the priorty level. yes, "priorty". valid levels are: low, high, default.

and how does she do it? depends where you live:

  • on Unix, the process is tagged using the nice command.
  • on Windows, the process is modifed via the twapi::set_priority_class.

(and yes, "modifed". we are nothing if not faithful. 🫢)

::processman::process_list

return a list of processes that have been triggered by this program, plus a boolean flag to indicate if the process is still running. receipts AND status. love that for us. πŸ’…

::processman::process_list id

return true if process id is still running, false otherwise. vibe check, but for processes. 🌈

::processman::spawn id cmd args

start a child process, identified by id. cmd is the name of the command to execute. args are arguments to pass to that command. new baby process, just dropped. πŸ“


😭 BUGS, IDEAS, FEEDBACK 😭

ngl, this document β€” and the package it describes β€” will undoubtedly contain bugs and other problems. she's not perfect, she's just doing her best. 😭

so please report such in the category odie of the Tcllib Trackers:

http://core.tcl.tk/tcllib/reportlist

and please also report any ideas for enhancements you may have for either the package and/or the documentation. we want the ideas. give us the ideas. 🫢✨

when proposing code changes, please provide unified diffs, i.e the output of diff -u.

also note: attachments are strongly preferred over inlined patches. how do you attach? go to the Edit form of the ticket immediately after its creation, and then use the left-most button in the secondary navigation bar. that's the way. iykyk. πŸ’…


🌟 KEYWORDS 🌟

odie, processman


🧚 CATEGORY 🧚

System


Copyright (c) 2015 Sean Woods <yoda@etoyoc.com>


and that's the whole page bestie!! this cutie is from tcllib, version 0.8, and the manual page itself is dated processman(n). go forth and manage your child processes responsibly. mwah πŸ’‹πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from