Removed an unused semaphore
This commit is contained in:
parent
1e66e6c817
commit
0dc2a6155a
2 changed files with 0 additions and 20 deletions
|
@ -163,14 +163,6 @@ namespace Mist {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::semaphore waiting(std::string("/wait_" + config->getString("streamname")).c_str(), O_CREAT | O_RDWR, ACCESSPERMS, 0);
|
|
||||||
if (!waiting){
|
|
||||||
DEBUG_MSG(DLVL_FAIL, "Failed to open semaphore - cancelling");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
waiting.post();
|
|
||||||
waiting.close();
|
|
||||||
|
|
||||||
DEBUG_MSG(DLVL_HIGH,"Pre-While");
|
DEBUG_MSG(DLVL_HIGH,"Pre-While");
|
||||||
|
|
||||||
long long int activityCounter = Util::getMS();
|
long long int activityCounter = Util::getMS();
|
||||||
|
|
|
@ -34,18 +34,6 @@ int main(int argc, char * argv[]) {
|
||||||
//wait for the process to exit
|
//wait for the process to exit
|
||||||
int status;
|
int status;
|
||||||
while (waitpid(pid, &status, 0) != pid && errno == EINTR) continue;
|
while (waitpid(pid, &status, 0) != pid && errno == EINTR) continue;
|
||||||
//clean up the semaphore by waiting for it, if it's non-zero
|
|
||||||
IPC::semaphore waiting(std::string("/wait_" + conf.getString("streamname")).c_str(), O_CREAT | O_RDWR, ACCESSPERMS, 0);
|
|
||||||
if (!waiting){
|
|
||||||
DEBUG_MSG(DLVL_FAIL, "Failed to open semaphore - cancelling");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
int sem_val = waiting.getVal();
|
|
||||||
while (sem_val){
|
|
||||||
waiting.wait();
|
|
||||||
sem_val = waiting.getVal();
|
|
||||||
}
|
|
||||||
waiting.close();
|
|
||||||
//if the exit was clean, don't restart it
|
//if the exit was clean, don't restart it
|
||||||
if (WIFEXITED(status) && (WEXITSTATUS(status) == 0)){
|
if (WIFEXITED(status) && (WEXITSTATUS(status) == 0)){
|
||||||
DEBUG_MSG(DLVL_MEDIUM, "Finished player succesfully");
|
DEBUG_MSG(DLVL_MEDIUM, "Finished player succesfully");
|
||||||
|
|
Loading…
Add table
Reference in a new issue