mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
neutrino: wait for timerd to avoid race on startup
Origin commit data
------------------
Branch: ni/coolstream
Commit: 84609f22ab
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-11-03 (Sat, 03 Nov 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -469,12 +469,16 @@ int timerd_main_thread(void *data)
|
||||
|
||||
CBasicServer timerd_server;
|
||||
|
||||
if (!timerd_server.prepare(TIMERD_UDS_NAME))
|
||||
if (!timerd_server.prepare(TIMERD_UDS_NAME)) {
|
||||
*(long *)data = -2; /* signal neutrino that waiting is pointless */
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Start timer thread
|
||||
CTimerManager::getInstance();
|
||||
CTimerManager::getInstance()->wakeup =(bool)data;
|
||||
CTimerManager::getInstance()->wakeup = !!(*(long *)data);
|
||||
|
||||
*(long *)data = -1; /* signal we're up and running */
|
||||
|
||||
timerd_server.run(timerd_parse_command, CTimerdMsg::ACTVERSION);
|
||||
printf("timerd shutdown complete\n");
|
||||
|
Reference in New Issue
Block a user