ssl_server2: exit cleanly on SIGINT too
This commit is contained in:
parent
98aa19148c
commit
403a86f73d
1 changed files with 3 additions and 2 deletions
|
@ -656,8 +656,9 @@ int main( int argc, char *argv[] )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
/* Abort cleanly on SIGTERM */
|
/* Abort cleanly on SIGTERM and SIGINT */
|
||||||
signal( SIGTERM, term_handler );
|
signal( SIGTERM, term_handler );
|
||||||
|
signal( SIGINT, term_handler );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( argc == 0 )
|
if( argc == 0 )
|
||||||
|
@ -1412,7 +1413,7 @@ reset:
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
if( received_sigterm )
|
if( received_sigterm )
|
||||||
{
|
{
|
||||||
printf( " interrupted by SIGTERM\n" );
|
printf( " interrupted by signal\n" );
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue