1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

fix: no-op when signal handlers are called on threads not managed by PHP (#9766)

This commit is contained in:
Kévin Dunglas
2022-10-22 11:17:27 +02:00
committed by GitHub
parent 77eadc5c9f
commit 9da75d0c63
5 changed files with 21 additions and 1 deletions

View File

@@ -779,4 +779,9 @@ TSRM_API const char *tsrm_api_name(void)
#endif
}/*}}}*/
TSRM_API bool tsrm_is_managed_thread()
{/*{{{*/
return tsrm_tls_get() ? true : false;
}/*}}}*/
#endif /* ZTS */

View File

@@ -137,6 +137,7 @@ TSRM_API size_t tsrm_get_ls_cache_tcb_offset(void);
TSRM_API bool tsrm_is_main_thread(void);
TSRM_API bool tsrm_is_shutdown(void);
TSRM_API const char *tsrm_api_name(void);
TSRM_API bool tsrm_is_managed_thread(void);
#ifdef TSRM_WIN32
# define TSRM_TLS __declspec(thread)