Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
main-afb-daemon: Export API after initialization
[src/app-framework-binder.git]
/
src
/
jobs.c
diff --git
a/src/jobs.c
b/src/jobs.c
index
16434d4
..
9768f26
100644
(file)
--- a/
src/jobs.c
+++ b/
src/jobs.c
@@
-49,13
+49,6
@@
#include "fdev-epoll.h"
#endif
#include "fdev-epoll.h"
#endif
-#if 0
-#define _alert_ "do you really want to remove signal monitoring?"
-#define sig_monitor_init_timeouts() ((void)0)
-#define sig_monitor_clean_timeouts() ((void)0)
-#define sig_monitor(to,cb,arg) (cb(0,arg))
-#endif
-
#define EVENT_TIMEOUT_TOP ((uint64_t)-1)
#define EVENT_TIMEOUT_CHILD ((uint64_t)10000)
#define EVENT_TIMEOUT_TOP ((uint64_t)-1)
#define EVENT_TIMEOUT_CHILD ((uint64_t)10000)
@@
-167,7
+160,7
@@
static struct job *job_create(
job = malloc(sizeof *job);
pthread_mutex_lock(&mutex);
if (!job) {
job = malloc(sizeof *job);
pthread_mutex_lock(&mutex);
if (!job) {
- errno =
-
ENOMEM;
+ errno = ENOMEM;
goto end;
}
}
goto end;
}
}
@@
-313,7
+306,8
@@
static void evloop_run(int signum, void *arg)
rc = sd_event_prepare(se);
if (rc < 0) {
errno = -rc;
rc = sd_event_prepare(se);
if (rc < 0) {
errno = -rc;
- ERROR("sd_event_prepare returned an error (state: %d): %m", sd_event_get_state(se));
+ CRITICAL("sd_event_prepare returned an error (state: %d): %m", sd_event_get_state(se));
+ abort();
} else {
if (rc == 0) {
rc = sd_event_wait(se, (uint64_t)(int64_t)-1);
} else {
if (rc == 0) {
rc = sd_event_wait(se, (uint64_t)(int64_t)-1);
@@
-874,12
+868,6
@@
int jobs_start(int allowed_count, int start_count, int waiter_count, void (*star
goto error;
}
goto error;
}
- /* start */
- if (sig_monitor_init() < 0) {
- ERROR("failed to initialise signal handlers");
- goto error;
- }
-
/* records the allowed count */
allowed = allowed_count;
started = 0;
/* records the allowed count */
allowed = allowed_count;
started = 0;