/*
- * Copyright (C) 2004-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2004-2010 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
+#include <sys/select.h>
#include "gcc-compat.h"
#include "log.h"
#include "string.h"
#include "fd.h"
+#include "signal.h"
static int signal_pipe[2];
static void generic_signal_handler(int s)
{
write(signal_pipe[1], &s, sizeof(int));
- //fprintf(stderr, "got sig %i\n", s);
}
/**
DSS_DEBUG_LOG("catching signal %d\n", sig);
if (signal(sig, &generic_signal_handler) != SIG_ERR)
return 1;
- make_err_msg("signal %d", sig);
return -E_SIGNAL_SIG_ERR;
}
assert(r < 0);
if (err == EAGAIN)
return 0;
- make_err_msg("failed to read from signal pipe");
+ DSS_ERROR_LOG("failed to read from signal pipe\n");
return -ERRNO_TO_DSS_ERROR(err);
}