In ruby standard library, popen return a object which has pid method, In eventmachine, popen return a Connection object which contain no process id information.
Demo code here:
require 'eventmachine'
def work
s = EM.popen('ls')
puts s.pid # how to get new process's pid?
end
EventMachine.run {
work
EM.stop
}