From 5cbcecff0bb7fa1c617d3082e7ad94c22e5f4eb1 Mon Sep 17 00:00:00 2001 From: Naveen Saini Date: Wed, 3 Jul 2019 17:13:15 +0800 Subject: [PATCH] main: fix hdcpd service failure Child process not able to finish before parent process exits, which causing hdcpd service failure. Added wait function to block parent process until child process exits. Upstream-Status: Submitted[https://github.com/intel/hdcp/pull/17] Signed-off-by: Naveen Saini --- daemon/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon/main.cpp b/daemon/main.cpp index 9a028d7..ef1e047 100644 --- a/daemon/main.cpp +++ b/daemon/main.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include "hdcpdef.h" #include "srm.h" @@ -93,6 +94,8 @@ int32_t daemon_init(void) } else if (pid != 0) { + int status; + wait(&status); exit(SUCCESS); // parent exit } -- 2.17.1