Ruby获取进程ID的问题
摘要:
以下代码在Ruby 1.8.6下测试通过CODE:require 'sys/proctable'include SysProcTable.ps{ |p| puts p.pid.to_s if p.comm=='explorer.exe' #替换为需要的进程名} 阅读全文
posted @ 2011-12-28 16:04 wofengletian 阅读(551) 评论(0) 推荐(0)
posted @ 2011-12-28 16:04 wofengletian 阅读(551) 评论(0) 推荐(0)
posted @ 2011-12-28 16:01 wofengletian 阅读(244) 评论(0) 推荐(0)
posted @ 2011-12-28 15:58 wofengletian 阅读(187) 评论(0) 推荐(0)