along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "includes.h"
+#include <signal.h>
+#include "replace.h"
#include "system/filesys.h"
#include "system/select.h"
-#include "system/wait.h"
-#include "lib/util/dlinklist.h"
-#include "lib/events/events.h"
-#include "lib/events/events_internal.h"
+#include "events.h"
+#include "events_internal.h"
#define NUM_SIGNALS 64
if (sig_state->pipe_hack[0] == 0 &&
sig_state->pipe_hack[1] == 0) {
pipe(sig_state->pipe_hack);
- set_blocking(sig_state->pipe_hack[0], False);
- set_blocking(sig_state->pipe_hack[1], False);
+ ev_set_blocking(sig_state->pipe_hack[0], false);
+ ev_set_blocking(sig_state->pipe_hack[1], false);
}
ev->pipe_fde = event_add_fd(ev, ev, sig_state->pipe_hack[0],
EVENT_FD_READ, signal_pipe_handler, NULL);
for (j=0;j<count;j++) {
/* note the use of the sig_info array as a
ring buffer */
- int ofs = (counter.count + j) % SA_INFO_QUEUE_COUNT;
+ int ofs = ((count-1) + j) % SA_INFO_QUEUE_COUNT;
se->handler(ev, se, i, 1,
(void*)&sig_state->sig_info[i][ofs],
se->private_data);