9 Commits

Author SHA1 Message Date
5e68fbd132 podman exec CID without command should exit 125
Fixes: https://github.com/containers/podman/issues/22329

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-12 07:44:22 -04:00
9553f3bafa Run codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-08-25 16:32:31 -04:00
251d91699d libpod: switch to golang native error wrapping
We now use the golang error wrapping format specifier `%w` instead of
the deprecated github.com/pkg/errors package.

[NO NEW TESTS NEEDED]

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-07-05 16:06:32 +02:00
ffce869daa Revert "Exec: use ErrorConmonRead"
This reverts commit d3d97a25e8c87cf741b2e24ac01ef84962137106.

This does not resolve the issues we expected it would, and has
some unexpected side effects with the upcoming exec rework.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-03-09 09:50:40 -04:00
d3d97a25e8 Exec: use ErrorConmonRead
Before, we were using -1 as a bogus value in podman to signify something went wrong when reading from a conmon pipe. However, conmon uses negative values to indicate the runtime failed, and return the runtime's exit code.

instead, we should use a bogus value that is actually bogus. Define that value in the define package as MinInt32 (-1<< 31 - 1), which is outside of the range of possible pids (-1 << 31)

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2020-03-03 15:43:31 -05:00
34d22a4e5c Fix exit code failure
Be less precise on the exit code and lot the exit code to the journal when it fails.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-09-17 12:01:02 -04:00
535111b5d5 Use exit code constants
We have leaked the exit number codess all over the code, this patch
removes the numbers to constants.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-09-12 16:20:01 -04:00
01a8483a59 refactor to reduce duplicated error parsing
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-23 16:49:04 -04:00
479eeac62c move editing of exitCode to runtime
There's no way to get the error if we successfully get an exit code (as it's just printed to stderr instead).
instead of relying on the error to be passed to podman, and edit based on the error code, process it on the varlink side instead

Also move error codes to define package

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-23 13:29:33 -04:00