From 526dfe557faac8a2859c1574cb39f239cf3f9f71 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sat, 23 Dec 2017 12:35:48 +0000 Subject: the trick to get signal names requires skipping over POSIX stuff we don't have now. as seen by landry@ --- usr.sbin/pkg_add/OpenBSD/State.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm index 114b3001524..7871441baa5 100644 --- a/usr.sbin/pkg_add/OpenBSD/State.pm +++ b/usr.sbin/pkg_add/OpenBSD/State.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: State.pm,v 1.47 2017/11/01 18:18:10 espie Exp $ +# $OpenBSD: State.pm,v 1.48 2017/12/23 12:35:47 espie Exp $ # # Copyright (c) 2007-2014 Marc Espie # @@ -383,7 +383,10 @@ sub fillup_names for my $sym (keys %POSIX::) { next unless $sym =~ /^SIG([A-Z].*)/; - $signal_name[eval "&POSIX::$sym()"] = $1; + my $value = eval "&POSIX::$sym()"; + # skip over POSIX stuff we don't have like SIGRT or SIGPOLL + next unless defined $value; + $signal_name[$value] = $1; } # extra BSD signals $signal_name[5] = 'TRAP'; -- cgit v1.2.3