From e15685c66ab6cc58ae77bad9b5dc7099e34a2916 Mon Sep 17 00:00:00 2001 From: goerzh Date: Mon, 29 Apr 2019 16:01:19 +0800 Subject: [PATCH] stop to register service when exec php script --- skywalking.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/skywalking.c b/skywalking.c index d94a8dd..4a583b3 100644 --- a/skywalking.c +++ b/skywalking.c @@ -930,7 +930,12 @@ PHP_MINIT_FUNCTION (skywalking) { /* If you have INI entries, uncomment these lines */ if (SKYWALKING_G(enable)) { - module_init(); + if (strcasecmp("cli", sapi_module.name) == 0) { + sky_close = 1; + } else { + module_init(); + } + if (sky_close == 1) { return SUCCESS; } -- GitLab