childprocess:用于管理子进程的跨平台Ruby库 源码
子进程 这个gem旨在成为一种简单可靠的解决方案,用于控制在Ruby / OS组合中在后台运行的外部程序。 该代码起源于 gem,但应证明它是独立的库很有用。 要求 Ruby 2.4以上版本,JRuby 9以上版本 Windows用户必须确保安装了ffi gem( >= 1.0.11 )才能使用ChildProcess。 用法 从ChildProcess.build返回的对象将实现ChildProcess::AbstractProcess 。 基本例子 process = ChildProcess . build ( "ruby" , "-e" , "sleep" ) # inherit stdout/stderr from parent... process . io . inherit! # ...or pass an IO process . io . stdout = Tempf
下载地址
用户评论