Re: [PATCH/RFC 1/2] wrapper: supply xsetenv
- From
Jeff King <peff@peff.net>
- Date
- Dec 13, 2011, 18:16 UTC
- Message-ID
- <20111213181602.GB1663@sigill.intra.peff.net>
- In-Reply-To
- <1323778227-1664-1-git-send-email-kusmabite@gmail.com>
On Tue, Dec 13, 2011 at 01:10:26PM +0100, Erik Faye-Lund wrote:
Show 5 quoted lines
> +int xsetenv(const char *name, const char *val, int overwrite)
> +{
> + if (setenv(name, val, overwrite))
> + die_errno("setenv failed");
> +}It probably doesn't matter, because the error condition is almost certainly just "oops, we ran out of memory". But you could also print the name of the variable being set, which may give the user a clue to some misconfiguration (e.g., trying to put some extremely long value into the environment).
-Peff