diff --git a/configure b/configure index 90c012fdaee..238a2787026 100755 --- a/configure +++ b/configure @@ -16534,6 +16534,7 @@ esac + for ac_func in \ @@ -16581,6 +16582,7 @@ for ac_func in \ rfork \ sched_yield \ select \ + setproctitle \ setrlimit \ settimeofday \ sigaltstack \ diff --git a/configure.ac b/configure.ac index 6f7f063a944..b81e11c515d 100644 --- a/configure.ac +++ b/configure.ac @@ -1364,6 +1364,7 @@ AC_CHECK_FUNCS(\ rfork \ sched_yield \ select \ + setproctitle \ setrlimit \ settimeofday \ sigaltstack \ diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 4b4d3cd110d..6156203d408 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -897,6 +897,10 @@ static void start_process( void *arg ) */ static void set_process_name( int argc, char *argv[] ) { +#ifdef HAVE_SETPROCTITLE + setproctitle("-%s", argv[1]); +#endif + #ifdef HAVE_PRCTL int i, offset; char *p, *prctl_name = argv[1]; diff --git a/include/config.h.in b/include/config.h.in index 14a26489601..1b2c828cb19 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -588,6 +588,9 @@ /* Define to 1 if you have the `sendmsg' function. */ #undef HAVE_SENDMSG +/* Define to 1 if you have the `setproctitle' function. */ +#undef HAVE_SETPROCTITLE + /* Define to 1 if you have the `setrlimit' function. */ #undef HAVE_SETRLIMIT