Ruby has a lot of ways to run system commands, be it with system(), or exec(), or backticks, etc.

However, I've been finding that only system and exec (as far as I know) are able to print the colored output of some of my commands while also providing a PID which allows me to cancel the command.

Is there any other way to run system commands from a Ruby command-line script such that I am able to meet the following requirements?

1. See the colored output (helps with organization)
2. Capture output to a variable
3. Get a PID so I can cancel execution if I need to (I already have the code for this, I just need the PID)