So basically what I'm trying to do is have a system call in ruby and find out the PID of that new process. I am trying to execute another program through my system call, however the program being executed will never finish so I need to eventually kill it using the pid.
I have been unable to figure out how to do this. So far I have looked at system() which returns true/false if the program was executed successfully, which isn't useful. I have tried to fork it, but that also doesn't work because it returns the PID of the fork not the system call.
Any help is greatly appreciated.
Sorry if this question has been asked before I have been unable to find it.