summaryrefslogtreecommitdiff
authorsandman <sandman>2002-10-29 19:33:49 (UTC)
committer sandman <sandman>2002-10-29 19:33:49 (UTC)
commit7c340d2a08601f4d27f6d2a407fc0de437b8efad (patch) (unidiff)
treec6a01ef4e7623ea1da758030e691531f0476885e
parent2957aae1073f4c41dd6783c41d1199be71cd9f4a (diff)
downloadopie-7c340d2a08601f4d27f6d2a407fc0de437b8efad.zip
opie-7c340d2a08601f4d27f6d2a407fc0de437b8efad.tar.gz
opie-7c340d2a08601f4d27f6d2a407fc0de437b8efad.tar.bz2
when quitting opie-login, don't kill the process id returned by getppid(),
but use the previously saved "real" parent pid.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/opie-login/loginapplication.cpp5
-rw-r--r--core/opie-login/loginapplication.h5
-rw-r--r--core/opie-login/main.cpp11
3 files changed, 14 insertions, 7 deletions
diff --git a/core/opie-login/loginapplication.cpp b/core/opie-login/loginapplication.cpp
index 103d63b..8d86a71 100644
--- a/core/opie-login/loginapplication.cpp
+++ b/core/opie-login/loginapplication.cpp
@@ -46,3 +46,3 @@ LoginApplication *lApp;
46 46
47LoginApplication::LoginApplication ( int &argc, char **argv ) 47LoginApplication::LoginApplication ( int &argc, char **argv, pid_t parentpid )
48 : QPEApplication ( argc, argv, GuiServer ) 48 : QPEApplication ( argc, argv, GuiServer )
@@ -50,2 +50,3 @@ LoginApplication::LoginApplication ( int &argc, char **argv )
50 lApp = this; 50 lApp = this;
51 m_parentpid = parentpid;
51} 52}
@@ -218,3 +219,3 @@ void LoginApplication::quitToConsole ( )
218 QPEApplication::quit ( ); 219 QPEApplication::quit ( );
219 ::kill ( ::getppid ( ), SIGTERM ); 220 ::kill ( m_parentpid, SIGTERM );
220} 221}
diff --git a/core/opie-login/loginapplication.h b/core/opie-login/loginapplication.h
index 062c088..4e7cf79 100644
--- a/core/opie-login/loginapplication.h
+++ b/core/opie-login/loginapplication.h
@@ -41,3 +41,3 @@ class LoginApplication : public QPEApplication {
41public: 41public:
42 LoginApplication ( int &argc, char **argv ); 42 LoginApplication ( int &argc, char **argv, pid_t parentpid );
43 43
@@ -62,2 +62,5 @@ private:
62#endif 62#endif
63
64private:
65 pid_t m_parentpid;
63}; 66};
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index 579a93a..674829d 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -62,3 +62,3 @@ using namespace Opie;
62 62
63int login_main ( int argc, char **argv ); 63int login_main ( int argc, char **argv, pid_t ppid );
64void sigterm ( int sig ); 64void sigterm ( int sig );
@@ -74,2 +74,5 @@ int main ( int argc, char **argv )
74{ 74{
75 pid_t ppid = ::getpid ( );
76
77
75 if ( ::geteuid ( ) != 0 ) { 78 if ( ::geteuid ( ) != 0 ) {
@@ -185,3 +188,3 @@ int main ( int argc, char **argv )
185 else 188 else
186 ::exit ( login_main ( argc, argv )); 189 ::exit ( login_main ( argc, argv, ppid ));
187 } 190 }
@@ -304,6 +307,6 @@ private:
304 307
305int login_main ( int argc, char **argv ) 308int login_main ( int argc, char **argv, pid_t ppid )
306{ 309{
307 QWSServer::setDesktopBackground( QImage() ); 310 QWSServer::setDesktopBackground( QImage() );
308 LoginApplication *app = new LoginApplication ( argc, argv ); 311 LoginApplication *app = new LoginApplication ( argc, argv, ppid );
309 312