提交 6d00101e 编写于 作者: A Andy Polyakov

Latest MSVCR80 doesn't tolerate unsupported signal numbers, throwing

fatal exceptions.
上级 7a06050c
...@@ -586,6 +586,14 @@ static void pushsig(void) ...@@ -586,6 +586,14 @@ static void pushsig(void)
sa.sa_handler=recsig; sa.sa_handler=recsig;
#endif #endif
#ifdef OPENSSL_SYS_WIN32
savsig[SIGABRT]=signal(SIGABRT,recsig);
savsig[SIGFPE]=signal(SIGFPE,recsig);
savsig[SIGILL]=signal(SIGILL,recsig);
savsig[SIGINT]=signal(SIGINT,recsig);
savsig[SIGSEGV]=signal(SIGSEGV,recsig);
savsig[SIGTERM]=signal(SIGTERM,recsig);
#else
for (i=1; i<NX509_SIG; i++) for (i=1; i<NX509_SIG; i++)
{ {
#ifdef SIGUSR1 #ifdef SIGUSR1
...@@ -606,6 +614,7 @@ static void pushsig(void) ...@@ -606,6 +614,7 @@ static void pushsig(void)
savsig[i]=signal(i,recsig); savsig[i]=signal(i,recsig);
#endif #endif
} }
#endif
#ifdef SIGWINCH #ifdef SIGWINCH
signal(SIGWINCH,SIG_DFL); signal(SIGWINCH,SIG_DFL);
...@@ -616,6 +625,14 @@ static void popsig(void) ...@@ -616,6 +625,14 @@ static void popsig(void)
{ {
int i; int i;
#ifdef OPENSSL_SYS_WIN32
signal(SIGABRT,savsig[SIGABRT]);
signal(SIGFPE,savsig[SIGFPE]);
signal(SIGILL,savsig[SIGILL]);
signal(SIGINT,savsig[SIGINT]);
signal(SIGSEGV,savsig[SIGSEGV]);
signal(SIGTERM,savsig[SIGTERM]);
#else
for (i=1; i<NX509_SIG; i++) for (i=1; i<NX509_SIG; i++)
{ {
#ifdef SIGUSR1 #ifdef SIGUSR1
...@@ -632,6 +649,7 @@ static void popsig(void) ...@@ -632,6 +649,7 @@ static void popsig(void)
signal(i,savsig[i]); signal(i,savsig[i]);
#endif #endif
} }
#endif
} }
static void recsig(int i) static void recsig(int i)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册