From bb83839615b334d662ac6505ab2085dc16c4ab21 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. Issue is observed if CMAKE_BUILD_TYPE=Release 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 1b70825..099006b 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 }