On Sun, Aug 26 2018, Christian Weisgerber <na...@mips.inka.de> wrote: > I noticed this curious error in a package bulk build: > Use of uninitialized value $pid in numeric eq (==) at > /usr/libdata/perl5/LT/Exec.pm line 96. > > Perl's fork() wrapper returns undef rather than -1 on error. > Handle this correctly. OK?
ok jca@ > Index: LT/Exec.pm > =================================================================== > RCS file: /cvs/src/usr.bin/libtool/LT/Exec.pm,v > retrieving revision 1.4 > diff -u -p -r1.4 Exec.pm > --- LT/Exec.pm 11 Jul 2012 12:54:07 -0000 1.4 > +++ LT/Exec.pm 26 Aug 2018 14:00:15 -0000 > @@ -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) { -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE