From b0c40098c822ec7931540c37764a463a78acda08 Mon Sep 17 00:00:00 2001 From: gaohuatao Date: Thu, 14 May 2020 08:34:31 -0400 Subject: [PATCH] lxc: disable terminal stdout/stderr pipe O_NONBLOCK Signed-off-by: gaohuatao --- ...rminal-stdout-stderr-pipe-O_NONBLOCK.patch | 32 +++++++++++++++++++ lxc.spec | 3 +- series.conf | 1 + 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0065-lxc-disable-terminal-stdout-stderr-pipe-O_NONBLOCK.patch diff --git a/0065-lxc-disable-terminal-stdout-stderr-pipe-O_NONBLOCK.patch b/0065-lxc-disable-terminal-stdout-stderr-pipe-O_NONBLOCK.patch new file mode 100644 index 0000000..98e9e92 --- /dev/null +++ b/0065-lxc-disable-terminal-stdout-stderr-pipe-O_NONBLOCK.patch @@ -0,0 +1,32 @@ +From 8c232b149654907867c12f10d801769f66d3500c Mon Sep 17 00:00:00 2001 +From: gaohuatao +Date: Wed, 13 May 2020 23:19:25 -0400 +Subject: [PATCH] lxc: disable terminal stdout/stderr pipe O_NONBLOCK + +Signed-off-by: gaohuatao +--- + src/lxc/terminal.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c +index 3d2960be..7441de79 100644 +--- a/src/lxc/terminal.c ++++ b/src/lxc/terminal.c +@@ -1668,12 +1668,12 @@ int lxc_terminal_create(struct lxc_terminal *terminal) + goto err; + } + /* for stdout */ +- if (pipe2(terminal->pipes[1], O_NONBLOCK | O_CLOEXEC)) { ++ if (pipe2(terminal->pipes[1], O_CLOEXEC)) { + ERROR("Failed to create stdout pipe"); + goto err; + } + /* for stderr */ +- if (pipe2(terminal->pipes[2], O_NONBLOCK | O_CLOEXEC)) { ++ if (pipe2(terminal->pipes[2], O_CLOEXEC)) { + ERROR("Failed to create stderr pipe"); + goto err; + } +-- +2.19.1 + diff --git a/lxc.spec b/lxc.spec index 4f0370e..2781114 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2020051101 +%global _release 2020051401 %global debug_package %{nil} Name: lxc @@ -72,6 +72,7 @@ Patch9060: 0061-mount-fix-symlink-error-use-parsed-path.patch Patch9061: 0062-change-log-level-of-seccomp-setup.patch Patch9062: 0063-hook-fix-memeory-leak.patch Patch9063: 0064-termainal-fix-console-log-memory-leak.patch +Patch9064: 0065-lxc-disable-terminal-stdout-stderr-pipe-O_NONBLOCK.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) diff --git a/series.conf b/series.conf index c80475c..c91479b 100644 --- a/series.conf +++ b/series.conf @@ -62,3 +62,4 @@ 0062-change-log-level-of-seccomp-setup.patch 0063-hook-fix-memeory-leak.patch 0064-termainal-fix-console-log-memory-leak.patch +0065-lxc-disable-terminal-stdout-stderr-pipe-O_NONBLOCK.patch -- Gitee