mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-25 22:56:35 +08:00
ssl_server2: exit cleanly on SIGINT too
This commit is contained in:
parent
98aa19148c
commit
403a86f73d
@ -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…
x
Reference in New Issue
Block a user