fix deadlock when subprocess exit

This commit is contained in:
vegbir 2021-12-17 11:16:43 +08:00
parent 3a61ee4ddc
commit 75e3dacd55
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 4ad5ee6eafcdef8178adf1cea53ab8a617d3fd78 Mon Sep 17 00:00:00 2001
From: yangjiaqi <yangjiaqi16@huawei.com>
Date: Wed, 15 Dec 2021 17:19:01 +0800
Subject: [PATCH] fix deadlock problem when subprocess exit
---
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 d02f841..0f66c40 100644
--- a/src/proc_fuse.c
+++ b/src/proc_fuse.c
@@ -563,7 +563,7 @@ struct devinfo* container_dev_read(pid_t pid) {
fflush(stream);
child_out:
fclose(stream);
- exit(0);
+ _exit(EXIT_SUCCESS);
}
close(mypipe[1]);
--
2.32.0 (Apple Git-132)

View File

@ -4,7 +4,7 @@
#Basic Information
Name: lxcfs
Version: 4.0.11
Release: 1
Release: 2
Summary: FUSE filesystem for LXC
License: LGPL 2.1+
URL: http://linuxcontainers.org
@ -27,6 +27,7 @@ Patch9014: 0014-fix-proc-diskstats-show-in-container.patch
Patch9015: 0015-lxcfs-adapt-4.18-kernel.patch
Patch9016: 0016-remove-lxcfs-tools-dependency-for-common-use.patch
Patch9017: 0017-proc_fuse-fix-wait-child-process-hang.patch
Patch9018: 0018-fix-deadlock-problem-when-subprocess-exit.patch
#Dependency
BuildRequires: autoconf automake libtool help2man
@ -88,6 +89,9 @@ fi
%{_unitdir}/*
%changelog
* Fri Dec 17 2021 yangjiaqi <yangjiaqi16@huawei.com> - 4.0.11-2
- fix deadlock caused by subprocess calling lxcfs_exit
* Sat Nov 27 2021 yangjiaqi <yangjiaqi16@huawei.com> - 4.0.11-1
- update to 4.0.11