[Tarantool-patches] [PATCH 01/13] popen: require popen handle to be non-NULL

Cyrill Gorcunov gorcunov at gmail.com
Fri Apr 10 10:16:27 MSK 2020


On Fri, Apr 10, 2020 at 05:50:39AM +0300, Alexander Turenko wrote:
> Further commits will add proper entries into the diagnostics area for
> failures inside popen functions. We should either report handle == NULL
> case via the diagnostics area or ensure that the NULL handle case is not
> possible.
> 
> The latter approach is implemented in this commit. There are two
> reasons for this:
> 
> * This way simplifies function contracts (one less kind of failure).
> * The popen Lua module (that will be implemented in the further commits)
>   will not construct any logic using NULL as a handle. When 'NULL
>   handle' error is not possible in the C API, it will be easier to
>   verify that this failure is not possible the Lua API.
> 
> A user of the C API should take care to don't call those functions with
> NULL handle.
> 
> Part of #4031

Acked-by: Cyrill Gorcunov <gorcunov at gmail.com>


More information about the Tarantool-patches mailing list