Get process id of process spawned via PTY.spawn

Hi,

i am spawning a longer running process via PTY.spawn (inside of a thread
actually) and printing its output. But i need the process id of the
spawned process in order to kill it on strg+c. The id i get in the
parameters of the block that i pass to PTY.spawn is not the same id as
the id i can see when doing ps aux | grep mycmd. How do i get hold of
the process id?

Thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs