This commit is contained in:
云风
2013-07-19 10:43:04 +08:00
parent f998e988dc
commit a018077472

View File

@@ -1,6 +1,7 @@
#include "skynet_imp.h"
#include "skynet_env.h"
#include "luacompat52.h"
#include "xmalloc.h"
#include <stdio.h>
#include <stdlib.h>
@@ -8,6 +9,7 @@
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include <signal.h>
static int
optint(const char *key, int opt) {
@@ -71,6 +73,13 @@ _init_env(lua_State *L) {
lua_pop(L,1);
}
int sigign() {
struct sigaction sa;
sa.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &sa, 0);
return 0;
}
int
main(int argc, char *argv[]) {
const char * config_file = "config";
@@ -79,6 +88,8 @@ main(int argc, char *argv[]) {
}
skynet_env_init();
sigign();
struct skynet_config config;
struct lua_State *L = luaL_newstate();