#include "common.h"
#include "options.h"
#include "sensor.h"
+#include "actuator.h"
// --- Standard headers --- //
#include <signal.h> // for signal handling
// At the moment just always exit.
// Call `exit` so that Cleanup will be called to... clean up.
Log(LOGWARN, "Got signal %d (%s). Exiting.", signal, strsignal(signal));
- Thread_QuitProgram(false);
+
//exit(signal);
}
signal(signals[i], SignalHandler);
}
*/
- Sensor_Spawn();
+ Sensor_Init();
+ Actuator_Init();
+ Sensor_StartAll("test");
+ Actuator_StartAll("test");
// run request thread in the main thread
FCGI_RequestLoop(NULL);
- // Join the dark side, Luke
- // *cough*
- // Join the sensor threads
- Sensor_Join();
+ Sensor_StopAll();
+ Actuator_StopAll();
+
Cleanup();
return 0;
}