author | zecke <zecke> | 2004-09-26 14:15:24 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-26 14:15:24 (UTC) |
commit | 31c049a24effde037c20ed9446d2725f3cb718c3 (patch) (unidiff) | |
tree | 3f33fd5ef8ceb057a1066c4f1a09ff5869bde3f4 /core | |
parent | 77441b90e9b5a4a23b080e7ac53a512abe96f8a9 (diff) | |
download | opie-31c049a24effde037c20ed9446d2725f3cb718c3.zip opie-31c049a24effde037c20ed9446d2725f3cb718c3.tar.gz opie-31c049a24effde037c20ed9446d2725f3cb718c3.tar.bz2 |
Since some 2.6.8 kernel the Linux kernel one can set
the process name with prctl. Let us use this as well
-rw-r--r-- | core/tools/quicklauncher/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp index fb2ca44..286aed2 100644 --- a/core/tools/quicklauncher/main.cpp +++ b/core/tools/quicklauncher/main.cpp | |||
@@ -45,4 +45,12 @@ using namespace Opie::Core; | |||
45 | #include <sys/types.h> | 45 | #include <sys/types.h> |
46 | #include <sys/stat.h> | 46 | #include <sys/stat.h> |
47 | |||
48 | #ifdef _OS_LINUX_ | ||
49 | #include <sys/prctl.h> | ||
50 | #ifndef PR_SET_NAME | ||
51 | #define PR_SET_NAME 15 | ||
52 | #endif | ||
53 | #endif | ||
54 | |||
47 | #include <unistd.h> | 55 | #include <unistd.h> |
48 | 56 | ||
@@ -167,4 +175,5 @@ private: | |||
167 | // Change name of process | 175 | // Change name of process |
168 | setproctitle(myargv[0]); | 176 | setproctitle(myargv[0]); |
177 | prctl( PR_SET_NAME, (unsigned long)myargv[0], 0, 0, 0 ); | ||
169 | #endif | 178 | #endif |
170 | 179 | ||