Gerald Pfeifer : kernel32: Use setproctitle where applicable to set the process name.
Alexandre Julliard
julliard at winehq.org
Mon Jan 21 05:59:02 CST 2008
Module: wine
Branch: master
Commit: 39f672798ba4ff3173e7f9e5f7820237c1e31eb4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=39f672798ba4ff3173e7f9e5f7820237c1e31eb4
Author: Gerald Pfeifer <gerald at pfeifer.com>
Date: Sun Jan 20 21:23:08 2008 +0100
kernel32: Use setproctitle where applicable to set the process name.
Based on a patch by Kris Moore.
---
configure | 2 ++
configure.ac | 1 +
dlls/kernel32/process.c | 4 ++++
include/config.h.in | 3 +++
4 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index 90c012f..238a278 100755
--- a/configure
+++ b/configure
@@ -16536,6 +16536,7 @@ esac
+
for ac_func in \
_pclose \
_popen \
@@ -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 6f7f063..b81e11c 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 4b4d3cd..6156203 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 14a2648..1b2c828 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
More information about the wine-cvs
mailing list