iSulad/0167-fix-error-for-cat-bigdata-in-oci-runtime.patch
openeuler-sync-bot 955d185c18 !645 [sync] PR-641: upgrade from upstream
* upgrade from upstream
2023-12-22 01:09:39 +00:00

34 lines
1.2 KiB
Diff

From a83cc7ff8abaec249054b18e86d5e0ade3825f77 Mon Sep 17 00:00:00 2001
From: haozi007 <liuhao27@huawei.com>
Date: Mon, 6 Nov 2023 19:46:25 +0800
Subject: [PATCH 167/181] fix error for cat bigdata in oci runtime
Signed-off-by: haozi007 <liuhao27@huawei.com>
---
src/cmd/isulad-shim/process.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/cmd/isulad-shim/process.c b/src/cmd/isulad-shim/process.c
index df6b7599..38b3a1a1 100644
--- a/src/cmd/isulad-shim/process.c
+++ b/src/cmd/isulad-shim/process.c
@@ -411,9 +411,12 @@ static stdio_t *initialize_io(process_t *p)
goto failure;
}
- /* don't open resize pipe */
- if ((pipe2(stdio_fd[0], O_CLOEXEC | O_NONBLOCK) != 0) || (pipe2(stdio_fd[1], O_CLOEXEC | O_NONBLOCK) != 0) ||
- (pipe2(stdio_fd[2], O_CLOEXEC | O_NONBLOCK) != 0)) {
+ /*
+ * don't open resize pipe;
+ * stdio pipes must not set to non-block, because 'cat big-file' will failed;
+ */
+ if ((pipe2(stdio_fd[0], O_CLOEXEC) != 0) || (pipe2(stdio_fd[1], O_CLOEXEC) != 0) ||
+ (pipe2(stdio_fd[2], O_CLOEXEC) != 0)) {
write_message(ERR_MSG, "open pipe failed when init io:%d", SHIM_SYS_ERR(errno));
goto failure;
}
--
2.42.0