ruby – Windows上有哪些Process.kill信号?

Process.kill的文档:

Sends the given signal to the specified process id(s) if pid is
positive. If pid is zero signal is sent to all processes whose group
ID is equal to the group ID of the process. signal may be an integer
signal number or a POSIX signal name (either with or without a SIG
prefix). If signal is negative (or starts with a minus sign),kills
process groups instead of processes. Not all signals are available
on all platforms.

好的,那很模糊.在哪些平台上可以获得哪些信号? Windows上是否有可用的信号?

(我之前在Windows上尝试过Process.kill(9,pid)并且它没有抛出错误.虽然它没有杀死进程…但是Process.kill(“TERM”,pid)确实抛出错误. 去搞清楚.)

解决方法

我想我找到了解决方案.要找出当前平台支持的信号,请运行以下命令:
ruby -e "puts Signal.list"

在Windows上:

{"EXIT"=>0,"INT"=>2,"ILL"=>4,"ABRT"=>22,"FPE"=>8,"KILL"=>9,"SEGV"=>11,"TERM"=>15}

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...