From 24a1744b7ec264ef71d4d4bbbbe52f3297751131 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 23 May 2017 21:26:35 +0200 Subject: [PATCH] Input now prints message and aborts cleanly when pull lock could not be opened. --- src/input/input.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/input/input.cpp b/src/input/input.cpp index dab14d13..6c323cd9 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -284,6 +284,10 @@ namespace Mist { void Input::stream(){ IPC::semaphore pullLock; pullLock.open(std::string("/MstPull_" + streamName).c_str(), O_CREAT | O_RDWR, ACCESSPERMS, 1); + if (!pullLock){ + FAIL_MSG("Could not open pull lock for stream '%s' - aborting!", streamName.c_str()); + return; + } if (!pullLock.tryWait()){ WARN_MSG("A pull process for stream %s is already running", streamName.c_str()); pullLock.close();