mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add gperf to heap check, use reload signal to terminate program normally
This commit is contained in:
parent
03a14e2e1a
commit
dcd568a0d7
6 changed files with 55 additions and 11 deletions
|
@ -233,6 +233,14 @@ int SrsServer::cycle()
|
|||
srs_update_system_time_ms();
|
||||
|
||||
if (signal_reload) {
|
||||
// for gperf heap checker,
|
||||
// @see: research/gperftools/heap-checker/heap_checker.cc
|
||||
// if user interrupt the program, exit to check mem leak.
|
||||
// but, if gperf, use reload to terminate the server,
|
||||
// for the SIGINT will cause core-dump.
|
||||
#ifdef SRS_GPERF
|
||||
break;
|
||||
#endif
|
||||
signal_reload = false;
|
||||
srs_info("get signal reload, to reload the config.");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue