Module: Signal

Defined in:
lib/signal-utils.rb

Overview

You should have received a copy of the GNU General Public License along with signal-utils. If not, see <www.gnu.org/licenses/>.

Defined Under Namespace

Modules: Mask

Class Method Summary collapse

Class Method Details

.signame(signo) ⇒ Object

The built-in signame seems to get confused with signo > 31, also add ‘SIG’ to the name



20
21
22
23
24
25
26
27
# File 'lib/signal-utils.rb', line 20

def self.signame(signo)
  s = Signal::list.invert[signo]
  if s
    "SIG" + s
  else
    signo
  end
end