I have a program which manages processes. It is designed for managing long-running processes, and when one of its processes exits, even successfully, then the whole process manager closes.
For example, I have this config file for the process manager:
foo: foo --do-foo bar: bar --do-bar
The "foo" command might exit 0, causing the whole process manager (and thus also the command
bar --do-bar) to close.
Avoiding submitting a change to said process manager, or using a different one, I'm thinking I can fool it into not exiting by adding another "innocuous" command to the end of my command which will cause it to "stall," and thus the process manager will not close. Some ideas that come to mind are calling
&& ruby or
&& read to make the command stall.
So, returning to my previous example, I would change my config file to:
foo: foo --do-foo && read bar: bar --do-bar
Then, even if
foo --do-foo exited 0, the command would "stall" because I called
read, and then the process manager would not close.
read "innocuous" and/or "cheap" commands to run to trick my process manager? Or is there an even simpler command that I could run to make the process "stall" and consume very few / none system resources?