aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/process.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/win32/process.c b/win32/process.c
index 95508264b..de8f653c5 100644
--- a/win32/process.c
+++ b/win32/process.c
@@ -361,7 +361,7 @@ mingw_spawn(char **argv)
361{ 361{
362 intptr_t ret; 362 intptr_t ret;
363 363
364 ret = mingw_spawn_1(P_NOWAIT, argv[0], (char *const *)argv, environ); 364 ret = mingw_spawn_proc((const char **)argv);
365 365
366 return ret == -1 ? -1 : GetProcessId((HANDLE)ret); 366 return ret == -1 ? -1 : GetProcessId((HANDLE)ret);
367} 367}
@@ -479,13 +479,12 @@ UNUSED_PARAM
479 comm = applet_name; 479 comm = applet_name;
480 } 480 }
481 else { 481 else {
482 char *name, *value; 482 char name[32], *value;
483 483
484 name = xasprintf("BB_APPLET_%d", sp->pid); 484 sprintf(name, "BB_APPLET_%d", sp->pid);
485 if ((value=getenv(name)) != NULL) { 485 if ((value=getenv(name)) != NULL) {
486 comm = value; 486 comm = value;
487 } 487 }
488 free(name);
489 } 488 }
490 safe_strncpy(sp->comm, comm, COMM_LEN); 489 safe_strncpy(sp->comm, comm, COMM_LEN);
491 return sp; 490 return sp;