Popen getting pid of newly run process
问题 I want to run some application in background and later kill it by pid. pipe = IO.popen("firefox 'some_url' 2>&1 &") pipe.pid This code starts firefox and return me some pid, but unfortunately it's not firefox's pid. pipe = IO.popen("firefox") pipe.pid This code starts firefox and return mi some pid, firefox's pid. Is there any solution to start external application and get its pid? Firefox is only for example it could be any other application. I also tried with libs like: Open3 and Open4 but