| Crates.io | tagrun |
| lib.rs | tagrun |
| version | 0.1.0 |
| created_at | 2023-01-03 16:28:17.626351+00 |
| updated_at | 2023-01-03 16:28:17.626351+00 |
| description | Run a program with a modified process name. |
| homepage | https://github.com/socrateslee/tagrun |
| repository | https://github.com/socrateslee/tagrun |
| max_upload_size | |
| id | 750247 |
| size | 7,031 |
Run a program with a modified process name. You can add a tag for a process with tagrun, and use the tag to locate the process with ps, pgrep or pkill.
tagrun [--tag PROCESS_NAME_TAG] [--prefix PROCESS_NAME_PREFIX] COMMAND [ARG] ...
Run COMMAND, and rename the process(i.e., argv[0] of the command line).
--tag Rename the command with PROCESS_NAME_TAG.
--prefix Prepend the PROCESS_NAME_PREFIX to the command line.
tagrun --tag awake --prefix [test] sleep 1000
Above command will be displayed in the result of ps aux like
[test]awake 1000
And you can use pgrep -f -x -a '\[test\]awake 1000' to match the process.