Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / libevent / nacl_nonsfi / signal_stub.c
blob8049030ff328d5abc2e602d4e6e1ee7d4fdc4462
1 /*
2 * Copyright 2015 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
7 /*
8 * In nacl_helper_nonsfi, socketpair() is unavailable. In libevent, it is used
9 * to notify of a signal handler invocation, which is unused in
10 * nacl_helper_nonsfi. Unfortunately, there is no macro to disable the feature,
11 * so we stub out the signal module entirely.
15 #include <signal.h>
16 #include <stdlib.h>
17 #include <sys/queue.h>
19 /* config.h must be included before any other libevent header is included. */
20 #include "config.h"
22 #include "third_party/libevent/event-internal.h"
23 #include "third_party/libevent/event.h"
24 #include "third_party/libevent/evsignal.h"
27 struct event_base *evsignal_base = 0;
29 int evsignal_init(struct event_base *base) {
30 /* Do nothing, and return success. */
31 return 0;
34 void evsignal_process(struct event_base *base) {
37 int evsignal_add(struct event *event) {
38 /* Do nothing, and return an error. */
39 return -1;
42 int evsignal_del(struct event *event) {
43 /* Do nothing, and return an error. */
44 return -1;
47 void evsignal_dealloc(struct event_base *base) {