Change-Id: If6a988359b4d2747cefdd683b6328f5b36e37548
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
* @param start The start routine to activate (can't be NULL)
* @return 0 in case of success or -1 in case of error.
*/
-int jobs_start(int allowed_count, int start_count, int waiter_count, void (*start)())
+int jobs_start(int allowed_count, int start_count, int waiter_count, void (*start)(int signum))
{
int rc, launched;
struct thread me;
extern void jobs_terminate();
-extern int jobs_start(int allowed_count, int start_count, int waiter_count, void (*start)());
+extern int jobs_start(int allowed_count, int start_count, int waiter_count, void (*start)(int signum));
| job for starting the daemon
+--------------------------------------------------------- */
-static void start()
+static void start(int signum)
{
struct afb_hsrv *hsrv;
+ if (signum) {
+ ERROR("start aborted: received signal %s", strsignal(signum));
+ exit(1);
+ }
+
// ------------------ sanity check ----------------------------------------
if (config->httpdPort <= 0) {
ERROR("no port is defined");