diff --git a/lib/base/process.cpp b/lib/base/process.cpp index 2592b3393..53af4ffd2 100644 --- a/lib/base/process.cpp +++ b/lib/base/process.cpp @@ -105,6 +105,7 @@ static Value ProcessSpawnImpl(struct msghdr *msgh, const Dictionary::Ptr& reques auto **envp = new char *[envc + (extraEnvironment ? extraEnvironment->GetLength() : 0) + 2]; const char* lcnumeric = "LC_NUMERIC="; + const char* notifySocket = "NOTIFY_SOCKET="; int j = 0; for (int i = 0; i < envc; i++) { @@ -112,6 +113,10 @@ static Value ProcessSpawnImpl(struct msghdr *msgh, const Dictionary::Ptr& reques continue; } + if (strncmp(environ[i], notifySocket, strlen(notifySocket)) == 0) { + continue; + } + envp[j] = strdup(environ[i]); ++j; }