我基本上问的是与 Spawn a background process in Ruby 相同的问题,除了我需要在 Windows 环境中生成后台进程!不幸的是,我的研究表明 Windows 不支持 Ruby 分支(仅支持勺子。Rimshot!)。
最佳答案
win32-process 库是 Win32Utils 套件的一部分,可能就是您所需要的。
http://win32utils.rubyforge.org/
The win32-process library adds the Process.create and Process.fork methods for MS Windows. In add addition, it provides different implementations of the wait, wait2, waitpid, and waitpid2 methods. The Process.create method allows you to create native MS Windows processes using a variety of different configuration options.
The Process.fork implementation should be considered experimental and not used in production code.
Installation: gem install win32-process
关于ruby - 在 Windows 上的 Ruby 中生成后台进程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3840525/