Subject: Re: pkg_add bugs
To: None <hubert.feyrer@informatik.fh-regensburg.de,>
From: Simon J. Gerraty <sjg@quick.com.au>
List: tech-pkg
Date: 06/17/2000 01:35:10
> > --- main.c 2000/01/19 23:28:28 1.14
> > +++ main.c 2000/06/16 14:30:40
> > @@ -197,7 +197,7 @@ main(int argc, char **argv)
> > if ((error = pkg_perform(&pkgs)) != 0) {
> > if (Verbose)
> > warnx("%d package addition(s) failed", error);
> > - return error;
> > - } else
> > - return 0;
> > + exit(1);
> > + }
> > + exit(0);
>
> don't do this.
> It makes a "pkg_add *" (which i happened to do today) stop, instead of
> continue with the next pkg.
Sorry, I don't follow. We are talking about main() doing return(errs)
cf. exit(1)? The only time the net result will be different is if
errs just happens to overflow the 8bit status field. The return(0)
cf. exit(0) is just for consistency, it should make no difference to
behaviour.
--sjg