0
我正在玩弄伟大的Tracepoint API,并且我在想是否可以将事件挂钩附加到使用popen3启动的ruby进程?Ruby Tracepoint - 将挂钩挂接到open3子进程
一个例子:
TracePoint.trace(:end) do |e|
# Here we do something like logging this event.
end
Open3.popen3(cmd) do |stdin, stdout, stderr, thread|
# cmd is a ruby cmd, and we want the tracepoint above to apply to it as well
end
任何想法?
drb服务器是一种选择。 –