# File lib/eventmachine.rb, line 1292 1292: def self.watch_process(pid, handler=nil, *args) 1293: pid = pid.to_i 1294: 1295: klass = klass_from_handler(ProcessWatch, handler, *args) 1296: 1297: s = EM::watch_pid(pid) 1298: c = klass.new s, *args 1299: # we have to set the path like this because of how Connection.new works 1300: c.instance_variable_set("@pid", pid) 1301: @conns[s] = c 1302: block_given? and yield c 1303: c 1304: end