kopia lustrzana https://github.com/stlink-org/stlink
Merge pull request #1395 from AJ528/develop
Added a graceful way to terminate st-utilpull/1397/head^2
commit
3520d735d7
|
@ -92,8 +92,13 @@ static void _cleanup() {
|
|||
static void cleanup(int32_t signum) {
|
||||
printf("Receive signal %i. Exiting...\n", signum);
|
||||
_cleanup();
|
||||
exit(1);
|
||||
(void)signum;
|
||||
// if asked to gracefully terminate
|
||||
if(signum == SIGTERM){
|
||||
// return 0
|
||||
exit(0);
|
||||
}else{
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
|
Ładowanie…
Reference in New Issue