watchdog implementation on S60 3rd
| Tue, 2006-11-14 20:50 | |
|
I am trying to implement a watchdog process that will re launch the main process if it crashes.
I am creating the watchdog from the main process using this code: RProcess server; server.Create(_L("c:\\sys\\bin\\watchdog.exe"), _L("")); CApaCommandLine* commandLine = CApaCommandLine::NewL(); commandLine->SetExecutableNameL(_L("c:\\sys\\bin\\watchdog.exe")); commandLine->SetProcessEnvironmentL(server); RApaLsSession ApaSession; ApaSession.Connect(); ApaSession.StartApp(*commandLine); ApaSession.Close(); the problem is that when the main process crashes, the watchdog process goes down with it, rendering it useless as a watchdog. any ideas ? |
|






Forum posts: 1233
seems simpler to implement too, no need to find the main process from the watchdog, since it will already have a handle to it.