From 6b636051af158fac017998732d7d121b8ea71081 Mon Sep 17 00:00:00 2001 From: zhongtao Date: Mon, 20 Nov 2023 12:59:09 +0000 Subject: [PATCH 20/64] !2253 bugfix for runc container exec * bugfix for runc container exec --- src/daemon/modules/runtime/isula/isula_rt_ops.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/daemon/modules/runtime/isula/isula_rt_ops.c b/src/daemon/modules/runtime/isula/isula_rt_ops.c index 83214c1a..e61d1f91 100644 --- a/src/daemon/modules/runtime/isula/isula_rt_ops.c +++ b/src/daemon/modules/runtime/isula/isula_rt_ops.c @@ -1386,17 +1386,16 @@ int rt_isula_exec(const char *id, const char *runtime, const rt_exec_params_t *p } ret = shim_create(fg_exec(params), id, workdir, bundle, cmd, exit_code, timeout, &shim_exit_code); - if (ret != 0) { - ERROR("%s: failed create shim process for exec %s", id, exec_id); - goto errlog_out; - } - if (shim_exit_code == SHIM_EXIT_TIMEOUT) { ret = -1; isulad_set_error_message("Exec container error;exec timeout"); ERROR("isulad-shim %d exit for execing timeout", pid); goto errlog_out; } + if (ret != 0) { + ERROR("%s: failed create shim process for exec %s", id, exec_id); + goto errlog_out; + } pid = get_container_process_pid(workdir); if (pid < 0) { -- 2.42.0