diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2018-08-26 19:09:56 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2018-08-26 19:09:56 +0000 |
commit | 04da204d4c6302de544c53e2efbeabd0d8de0e21 (patch) | |
tree | 157b98cd8a8a31c4c2a17b33d81a084d283dfa8c /usr.bin/libtool/LT | |
parent | fe0b228694cde1e4c439d8f8271c03448388a1a2 (diff) |
Handle fork() errors. The Perl fork() wrapper returns undef rather
than -1 on error. ok jca@
Diffstat (limited to 'usr.bin/libtool/LT')
-rw-r--r-- | usr.bin/libtool/LT/Exec.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/libtool/LT/Exec.pm b/usr.bin/libtool/LT/Exec.pm index 1f74cdd46a2..71cd738b83b 100644 --- a/usr.bin/libtool/LT/Exec.pm +++ b/usr.bin/libtool/LT/Exec.pm @@ -1,4 +1,4 @@ -# $OpenBSD: Exec.pm,v 1.4 2012/07/11 12:54:07 espie Exp $ +# $OpenBSD: Exec.pm,v 1.5 2018/08/26 19:09:55 naddy Exp $ # Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org> # Copyright (c) 2012 Marc Espie <espie@openbsd.org> @@ -93,7 +93,7 @@ sub command_run } tsay { "@l" }; my $pid = fork(); - if ($pid == -1) { + if (!defined $pid) { die "Couldn't fork while running @l\n"; } if ($pid == 0) { |