From: Christian Gmeiner Date: Tue, 12 Nov 2019 11:46:20 +0000 (+0100) Subject: drm-shim: fix EOF case X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e101af8671a13a8eb8ce714e07294b73a99821cd;p=mesa.git drm-shim: fix EOF case Close input end of the pipe after data was written. Without this fix I have seen a hang in sysfs_uevent_get(.., "OF_FULLNAME") when key was not found. Signed-off-by: Christian Gmeiner Reviewed-by: Eric Anholt --- diff --git a/src/drm-shim/drm_shim.c b/src/drm-shim/drm_shim.c index 7c7d5f0f009..381a94fb9d1 100644 --- a/src/drm-shim/drm_shim.c +++ b/src/drm-shim/drm_shim.c @@ -219,6 +219,7 @@ PUBLIC FILE *fopen(const char *path, const char *mode) pipe(fds); write(fds[1], file_overrides[i].contents, strlen(file_overrides[i].contents)); + close(fds[1]); return fdopen(fds[0], "r"); } }