1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Kernel: Support grab backtrace stack when assert fail. v5.0.80

This commit is contained in:
winlin 2022-10-21 23:30:43 +08:00
parent 5a1a234855
commit e10fa6dc91
19 changed files with 183 additions and 7 deletions

View file

@ -71,6 +71,9 @@ SrsServer* _srs_server = NULL;
// Whether setup config by environment variables, see https://github.com/ossrs/srs/issues/2277
bool _srs_config_by_env = false;
// The binary name of SRS.
const char* _srs_binary = NULL;
/**
* main entrance.
*/
@ -78,6 +81,9 @@ srs_error_t do_main(int argc, char** argv, char** envp)
{
srs_error_t err = srs_success;
// TODO: Might fail if change working directory.
_srs_binary = argv[0];
// Initialize global and thread-local variables.
if ((err = srs_global_initialize()) != srs_success) {
return srs_error_wrap(err, "global init");