popen: require popen handle to be non-NULL
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@gmail.com>
Please register or sign in to comment