Fixes erroneous call with an unused argument to a 0-argument function.
Current call fails with GCC 15.1:
```
python/crun_python.c: In function 'get_verbosity':
python/crun_python.c:461:27: error: too many arguments to function 'libcrun_get_verbosity'; expected 0, have 1
461 | return PyLong_FromLong (libcrun_get_verbosity (verbosity));
| ^~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
In file included from /home/user/.cache/yay/crun-krun/src/crun/src/libcrun/container.h:24:
/home/user/.cache/yay/crun-krun/src/crun/src/libcrun/error.h:109:20: note: declared here
109 | LIBCRUN_PUBLIC int libcrun_get_verbosity ();
| ^~~~~~~~~~~~~~~~~~~~~
```
Signed-off-by: Sebastian Gsänger <8004308+sgsaenger@users.noreply.github.com>
Remove "arg_unused" where not needed.
Add "args_unused" to be able to use the gcc option
-Werror=unused-parameter when building crun with the
configure flags:
--with-libkrun
--with-mono
--with-python-bindings
--with-wasmedge
--with-wasmer
--with-wasmtime
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
In `container_delete`, the type used for the `force` boolean should be
`b` (a single unsigned byte) instead of `n` (the size of `size_t`).
This incorrect type can cause the neighboring `id` argument to be
overwritten with a NULL value, which makes the container deletion fail.
Signed-off-by: Mattéo Delabre <git.matteo@delab.re>
The number of arguments in the format string passed to
`PyArg_ParseTupleAndKeywords` did not match the number of entries in
`kwlist`, resulting in an error when trying to pass non-mandatory
arguments such as `detach`.
Signed-off-by: Mattéo Delabre <git.matteo@delab.re>
do not fork the current process on create, this prevents creating
additional processes to wait for.
It solves a race when the OCI runtime caller has SUBREAPER set, such
as Buildah. When the initial process exited, the container process
cannot be directly waited for as there are other processes to reap
first.
Closes: https://github.com/containers/crun/issues/215
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>