proc_fuse: fix wait child process hang

Signed-off-by: zhangsong234 <zhangsong34@huawei.com>
This commit is contained in:
zhangsong234 2021-05-27 10:37:20 +08:00 committed by z00467446
parent 2e41060717
commit 10e833505b
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From aa362b383ca5e79e03fd350867fb4f96a1335ae5 Mon Sep 17 00:00:00 2001
From: zhangsong234 <zhangsong34@huawei.com>
Date: Thu, 27 May 2021 10:16:00 +0800
Subject: [PATCH] proc_fuse: fix wait child process hang
Signed-off-by: zhangsong234 <zhangsong34@huawei.com>
---
src/proc_fuse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/proc_fuse.c b/src/proc_fuse.c
index 96eb9d7..82b32c1 100644
--- a/src/proc_fuse.c
+++ b/src/proc_fuse.c
@@ -487,11 +487,11 @@ struct devinfo* container_dev_read(pid_t pid) {
dev_num = dev_stat.st_dev & (~0xf);
fprintf(stream, "sda %d end 0 ", dev_num);
fflush(stream);
+child_out:
fclose(stream);
exit(0);
}
-child_out:
close(mypipe[1]);
stream = fdopen(mypipe[0], "r");
if (stream == NULL) {
--
2.27.0

View File

@ -4,7 +4,7 @@
#Basic Information #Basic Information
Name: lxcfs Name: lxcfs
Version: 4.0.5 Version: 4.0.5
Release: 4 Release: 5
Summary: FUSE filesystem for LXC Summary: FUSE filesystem for LXC
License: LGPL 2.1+ License: LGPL 2.1+
URL: http://linuxcontainers.org URL: http://linuxcontainers.org
@ -26,6 +26,7 @@ Patch9013: 0013-add-secure-compile-option-in-Makefile.patch
Patch9014: 0014-fix-proc-diskstats-show-in-container.patch Patch9014: 0014-fix-proc-diskstats-show-in-container.patch
Patch9015: 0015-lxcfs-adapt-4.18-kernel.patch Patch9015: 0015-lxcfs-adapt-4.18-kernel.patch
Patch9016: 0016-remove-lxcfs-tools-dependency-for-common-use.patch Patch9016: 0016-remove-lxcfs-tools-dependency-for-common-use.patch
Patch9017: 0017-proc_fuse-fix-wait-child-process-hang.patch
#Dependency #Dependency
BuildRequires: autoconf automake libtool help2man BuildRequires: autoconf automake libtool help2man
@ -85,6 +86,9 @@ fi
%{_unitdir}/* %{_unitdir}/*
%changelog %changelog
* Thu May 27 2021 zhangsong234 <zhangsong34@huawei.com> - 4.0.5-5
- proc_fuse: fix wait child process hang
* Tue Mar 30 2021 zhangsong234 <zhangsong34@huawei.com> - 4.0.5-4 * Tue Mar 30 2021 zhangsong234 <zhangsong34@huawei.com> - 4.0.5-4
- remove lxcfs-tools dependency for common use - remove lxcfs-tools dependency for common use