aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/appletlib.c3
-rw-r--r--win32/process.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index f0ed85215..6c0be4a83 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -1248,9 +1248,6 @@ int main(int argc UNUSED_PARAM, char **argv)
1248 /* Ignore critical errors, such as calling GetVolumeInformation() on 1248 /* Ignore critical errors, such as calling GetVolumeInformation() on
1249 * a floppy or CDROM drive with no media. */ 1249 * a floppy or CDROM drive with no media. */
1250 SetErrorMode(SEM_FAILCRITICALERRORS); 1250 SetErrorMode(SEM_FAILCRITICALERRORS);
1251# ifdef _UCRT
1252 SetEnvironmentVariable("BB_HELLO", "world");
1253# endif
1254#endif 1251#endif
1255 1252
1256#if defined(__MINGW64_VERSION_MAJOR) 1253#if defined(__MINGW64_VERSION_MAJOR)
diff --git a/win32/process.c b/win32/process.c
index 812e259f4..137cb6a39 100644
--- a/win32/process.c
+++ b/win32/process.c
@@ -268,6 +268,14 @@ spawnveq(int mode, const char *path, char *const *argv, char *const *env)
268 new_path = xasprintf("%s.", path); 268 new_path = xasprintf("%s.", path);
269 } 269 }
270 270
271#if defined(_UCRT)
272 if (env) {
273 char buffer[64];
274
275 sprintf(buffer, "BB_HELLO_%d", getpid());
276 SetEnvironmentVariable(buffer, "1");
277 }
278#endif
271 errno = 0; 279 errno = 0;
272 ret = spawnve(mode, new_path ? new_path : path, new_argv, env); 280 ret = spawnve(mode, new_path ? new_path : path, new_argv, env);
273 281