summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/tools/quicklauncher/main.cpp9
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
@@ -39,16 +39,24 @@ using namespace Opie::Core;
39#include <qtopia/qpeapplication.h> 39#include <qtopia/qpeapplication.h>
40#undef private 40#undef private
41 41
42/* STD */ 42/* STD */
43#include <stdio.h> 43#include <stdio.h>
44#include <stdlib.h> 44#include <stdlib.h>
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
49 57
50using QuickPrivate::PluginLoader; 58using QuickPrivate::PluginLoader;
51 59
52static QPEApplication *app = 0; 60static QPEApplication *app = 0;
53static PluginLoader *loader = 0; 61static PluginLoader *loader = 0;
54static ApplicationInterface *appIface = 0; 62static ApplicationInterface *appIface = 0;
@@ -161,16 +169,17 @@ private:
161 myargv[j] = new char [strlen(argList.at(j))+1]; 169 myargv[j] = new char [strlen(argList.at(j))+1];
162 strcpy( myargv[j], argList.at(j) ); 170 strcpy( myargv[j], argList.at(j) );
163 } 171 }
164 172
165 myargv[myargc] = NULL; 173 myargv[myargc] = NULL;
166#ifdef _OS_LINUX_ 174#ifdef _OS_LINUX_
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
171 connect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit())); 180 connect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit()));
172 app->exit_loop(); 181 app->exit_loop();
173 app->initApp( myargc, myargv ); 182 app->initApp( myargc, myargv );
174 exec( myargc, myargv ); 183 exec( myargc, myargv );
175 } 184 }
176 185