kernel32: Use setproctitle where applicable to set the process name.
Based on a patch by Kris Moore.
This commit is contained in:
parent
1868abda89
commit
39f672798b
|
@ -16534,6 +16534,7 @@ esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ac_func in \
|
for ac_func in \
|
||||||
|
@ -16581,6 +16582,7 @@ for ac_func in \
|
||||||
rfork \
|
rfork \
|
||||||
sched_yield \
|
sched_yield \
|
||||||
select \
|
select \
|
||||||
|
setproctitle \
|
||||||
setrlimit \
|
setrlimit \
|
||||||
settimeofday \
|
settimeofday \
|
||||||
sigaltstack \
|
sigaltstack \
|
||||||
|
|
|
@ -1364,6 +1364,7 @@ AC_CHECK_FUNCS(\
|
||||||
rfork \
|
rfork \
|
||||||
sched_yield \
|
sched_yield \
|
||||||
select \
|
select \
|
||||||
|
setproctitle \
|
||||||
setrlimit \
|
setrlimit \
|
||||||
settimeofday \
|
settimeofday \
|
||||||
sigaltstack \
|
sigaltstack \
|
||||||
|
|
|
@ -897,6 +897,10 @@ static void start_process( void *arg )
|
||||||
*/
|
*/
|
||||||
static void set_process_name( int argc, char *argv[] )
|
static void set_process_name( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_SETPROCTITLE
|
||||||
|
setproctitle("-%s", argv[1]);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_PRCTL
|
#ifdef HAVE_PRCTL
|
||||||
int i, offset;
|
int i, offset;
|
||||||
char *p, *prctl_name = argv[1];
|
char *p, *prctl_name = argv[1];
|
||||||
|
|
|
@ -588,6 +588,9 @@
|
||||||
/* Define to 1 if you have the `sendmsg' function. */
|
/* Define to 1 if you have the `sendmsg' function. */
|
||||||
#undef HAVE_SENDMSG
|
#undef HAVE_SENDMSG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `setproctitle' function. */
|
||||||
|
#undef HAVE_SETPROCTITLE
|
||||||
|
|
||||||
/* Define to 1 if you have the `setrlimit' function. */
|
/* Define to 1 if you have the `setrlimit' function. */
|
||||||
#undef HAVE_SETRLIMIT
|
#undef HAVE_SETRLIMIT
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue