[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdelibs/kinit
From:       Frans Englich <frans.englich () telia ! com>
Date:       2004-09-26 1:24:21
Message-ID: 200409260124.21481.frans.englich () telia ! com
[Download RAW message or body]

On Sunday 26 September 2004 01:09, Dirk Mueller wrote:
> CVS commit by mueller:
>
> set the process name on linux, so that killall works correctly and you
> don't need ugly hacks like kdekillall.
>
> I'd like to backport this.. any objections?

That it was that simple. It have caused a lot of trouble :)


			Frans


>
>
>   M +12 -1     kinit.cpp   1.143
>
>
> --- kdelibs/kinit/kinit.cpp  #1.142:1.143
> @@ -60,4 +60,11 @@
>  #include <klocale.h>
>
> +#ifdef Q_OS_LINUX
> +#include <sys/prctl.h>
> +#ifndef PR_SET_NAME
> +#define PR_SET_NAME 15
> +#endif
> +#endif
> +
>  #if defined Q_WS_X11 && ! defined K_WS_QTONLY
>  #include <kstartupinfo.h> // schroder
> @@ -508,4 +515,8 @@ static pid_t launch(int argc, const char
>         /** Give the process a new name **/
>         kdeinit_setproctitle( "%s", procTitle.data() );
> +#ifdef Q_OS_LINUX
> +       /* set the process name, so that killall works like intended */
> +       prctl(PR_SET_NAME, (unsigned long) name.data(), 0, 0, 0);
> +#endif
>       }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic