HEADS DOWN

Sean C. Farley sean-freebsd at farley.org
Fri May 11 23:43:46 UTC 2007


On Fri, 11 May 2007, Andrey Chernov wrote:

> On Thu, May 10, 2007 at 06:58:45PM -0500, Sean C. Farley wrote:
>>  Would there be any other changes anybody can see need to be made?  What
>>  type of testing would be desired?  The regression tests I wrote provide
>>  a good basic test.
>
> I worry about this sort of things
> errx(EXIT_FAILURE, "environ corrupt");
>
> There is no mention anywhere that *env() functions can exit the
> program.  Moreover some programs in theory can temprorarily put
> incorrect values into environment via putenv() after-modification or
> direct environ assignments for their own reasons.
>
> I suggest to change errx() to warnx()+return(failure).

No need to worry any longer; I changed them into warnx().  What value
should I give errno?  I do not want the program to receive a random
error code.  The first warnx() could be EINVAL.  The second warnx()
would be a coding error on my part.  EDOOFUS would fit.  :)  I know I
should not use it.  EINVAL?

Sean
-- 
sean-freebsd at farley.org


More information about the freebsd-arch mailing list