From aa362b383ca5e79e03fd350867fb4f96a1335ae5 Mon Sep 17 00:00:00 2001 From: zhangsong234 Date: Thu, 27 May 2021 10:16:00 +0800 Subject: [PATCH] proc_fuse: fix wait child process hang Signed-off-by: zhangsong234 --- 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