* limitations under the License.
*/
-#include <syslog.h>
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <string.h>
+#include <getopt.h>
#include <setjmp.h>
#include <signal.h>
-#include <getopt.h>
-#include <pwd.h>
-#include <pthread.h>
+#include <syslog.h>
+#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include "afb-plugin.h"
+
#include "local-def.h"
#include "afb-apis.h"
#include "session.h"
sigset_t sigset;
// unlock signal to allow a new signal to come
- sigemptyset(&sigset);
- sigaddset(&sigset, signum);
- sigprocmask(SIG_UNBLOCK, &sigset, 0);
if (error_handler != NULL) {
+ sigemptyset(&sigset);
+ sigaddset(&sigset, signum);
+ sigprocmask(SIG_UNBLOCK, &sigset, 0);
longjmp(*error_handler, signum);
}
}
if (session->config->ldpaths)
afb_apis_add_pathset(session->config->ldpaths);
- ctxStoreInit(CTX_NBCLIENTS, session->config->cntxTimeout, afb_apis_count());
+ ctxStoreInit(CTX_NBCLIENTS, session->config->cntxTimeout, afb_apis_count(), session->config->token);
install_error_handlers();