-rw-r--r-- | core/launcher/main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 073e19a..762a596 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp @@ -29,12 +29,13 @@ #include <qpe/custom.h> #endif #include <opie/odevice.h> #include <qfile.h> +#include <qimage.h> #include <qwindowsystem_qws.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/alarmserver.h> #include <stdlib.h> #include <stdio.h> @@ -50,13 +51,13 @@ using namespace Opie; void initEnvironment() { Config config("locale"); config.setGroup( "Location" ); QString tz = config.readEntry( "Timezone", getenv("TZ") ); - // if not timezone set, pick New York + // if not timezone set, pick New York if (tz.isNull()) tz = "America/New_York"; setenv( "TZ", tz, 1 ); config.writeEntry( "Timezone", tz); @@ -126,13 +127,13 @@ int initApplication( int argc, char ** argv ) static const char *pidfile_path = "/var/run/opie.pid"; void create_pidfile ( ) { FILE *f; - + if (( f = ::fopen ( pidfile_path, "w" ))) { ::fprintf ( f, "%d", getpid ( )); ::fclose ( f ); } } @@ -153,13 +154,13 @@ int main( int argc, char ** argv ) ::signal ( SIGTERM, handle_sigterm ); ::signal ( SIGINT, handle_sigterm ); ::setsid ( ); ::setpgid ( 0, 0 ); - + ::atexit ( remove_pidfile ); create_pidfile ( ); int retVal = initApplication ( argc, argv ); // Kill them. Kill them all. |