Displaying 2 results from an estimated 2 matches for "19184d3e".
2017 Jan 26
1
Re: [nbdkit PATCH v2 4/6] plugins: Add new nbdkit_set_error() utility function
...ny of that code might touch errno. Since some of
> > that code would be in the language interpreter, we cannot even be
> > careful about preserving errno along those paths.
>
> Indeed - so it is a pre-existing bug.
Hmm, good point. I forgot that we were using errno even before 19184d3e.
Well I guess the patch is OK in that case.
> > So I think if the caller didn't call nbdkit_set_errno, we should
> > assume no errno value is available for us to use.
>
> Completely avoiding errno will make little difference to language
> binding plugins (errors will now...
2017 Jan 26
2
Re: [nbdkit PATCH v2 4/6] plugins: Add new nbdkit_set_error() utility function
On Wed, Jan 25, 2017 at 08:42:34PM -0600, Eric Blake wrote:
> +eg. NULL or -1. If the call to C<nbdkit_set_error> is omitted, then
> +the value of C<errno> will be used instead.
[...]
> +/* Grab the appropriate error value.
> + */
> +static int
> +_get_error (void)
> +{
> + int err = errno;
> + int ret = tls_get_error ();
> +
> + if (!ret)
> +