having syslog-to-discord push notifications is handy for things like

$ pgrep -alf tar
1138085 tar -cvzf CMU_Mach.tgz /afs/cs.cmu.edu/project/mach/

$ (proctool wait 1138085 && logger -p alert "mach download done") &

@grawity what’s proctool? I found proctools but that only provides pkill/pgrep

@domi something I wrote while hacking on my wmiirc a decade ago (along with strtool) https://git.nullroute.lt/grawity/bin.git/tree/misc/proctool.c

it predates things like pidfd so it's literally a C version of "while [ -e /proc/$pid ]; do sleep 10"

proctool.c « misc - bin.git - Mirror of https://github.com/grawity/code

@domi another implementation with more features https://hachyderm.io/@simontatham/116294781888932267
Simon Tatham (@[email protected])

… I forgot to provide a link, didn't I? See, that's why I prefer to avoid relying on my own memory. 'xafter' is available from my miscellaneous utilities page (also including 'after' and lots of other unrelated things): https://www.chiark.greenend.org.uk/~sgtatham/utils/

Hachyderm.io