BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] Corralling Processes on Linux
- Subject: [Discuss] Corralling Processes on Linux
- From: kentborg at borg.org (Kent Borg)
- Date: Sat, 20 Jan 2018 15:56:34 -0500
When I am dealing with files, I can easily delete them: if I am going to be creating cruft, I can put them all in a single directory, I can put subdirectories in that same directory, and when I am done, I can delete the whole thing, do it recursively, and they are gone. Easy. Is there a way to do this with daemonized processes? I create an oddball collection, and want the ability to kill the whole lot. Seems process group IDs might bark up this tree, but it doesn't look like I can tag a whole funny-shaped tree of processes with the same ID (this true?). And, my experiments along these lines have run into "operation not permitted"; I don't want to have to do this as root. (In the file example: I don't need to be root to put files and directories in a directory...) I thought about dropping a unique string on the command line of each process. I won't be able to reliably find it with ps because it truncates, but I could crawl through /proc/*/cmdline and kill the ones I find. (Is there a way to do this on Mac OS?) I thought about creating all these processes as a different user, and then killing everything owned by that user, but that probably requires root again (if that other user isn't me), and maybe I don't want to kill /everything/ (a login?) owned by the user. Why I am doing this: I am playing with lots of different processes communicating with each other, maybe some coming and going incrementally. I want the ability occasionally kill them all and start from a clean slate. ("Oh, I had two of that one running for the last hour! Silly /me/ to waste all that time!" ...I want to avoid that set of bugs.) Suggestions? Thanks, -kb
- Follow-Ups:
- [Discuss] Corralling Processes on Linux
- From: dsr at randomstring.org (Dan Ritter)
- [Discuss] Corralling Processes on Linux
- From: cra at WPI.EDU (Chuck Anderson)
- [Discuss] Corralling Processes on Linux
- Prev by Date: [Discuss] [Position-available] Sr Software Engineer - C++, Linux contract opening in MA
- Next by Date: [Discuss] Corralling Processes on Linux
- Previous by thread: [Discuss] [Position-available] Sr Software Engineer - C++, Linux contract opening in MA
- Next by thread: [Discuss] Corralling Processes on Linux
- Index(es):