mdv@comtst.UUCP (Mike Verstegen) (10/21/90)
Version: Perl 3.0 PL 37
Configuration: 3B2/600 Unix V.3.1.1 (Important point is that neither wait4
or waitpid are available).
Problem: regression test op.exec fails
Analysis: File util.c:
int
wait4pid(pid,statusp,flags)
int pid;
int *statusp;
int flags;
{
int result; <--------------------------------------------------<-+
STR *str; |
char spid[16]; |
|
[... skip down] ^
if (flags) |
fatal("Can't do waitpid with flags"); |
else { ^
int result; <<<<<< Note: this hides previous int result
register int count;
register STR *str;
while ((result = wait(statusp)) != pid && pid > 0 && result >= 0)
pidgone(result,*statusp);
if (result < 0)
*statusp = -1;
} <<<<< End of block, this uncovers outer "int result"
return result; <<<<< This returns the wrong "result"
Fix: Delete line 1334 (int result;)
Diff:
1371d1370
< int result;
--
Mike Verstegen Domain Systems, Inc Voice +1 407 686-7911
..!uunet!comtst!mdv 5840 Corporate Way #100 Fax +1 407 478-2542
mdv@domain.com West Palm Beach, FL 33407