[maemo-developers] [maemo-developers] How to keep app running indefinitely
From: Kimmo Hämäläinen kimmo.hamalainen at nokia.comDate: Thu Mar 9 11:26:56 EET 2006
- Previous message: [maemo-developers] How to keep app running indefinitely
- Next message: [maemo-developers] How to keep app running indefinitely
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 2006-03-08 at 22:05, ext Steven Hill wrote: > On Mon, 2006-06-03 at 01:46 +0100, Simon Budig wrote: > > Steven Hill (steveh at shscientific.com) wrote: > > > I have written an application for the Nokia 770 that I want to keep > > > running indefinitely - i.e. I want to stop the automatic process that > > > runs in the background and stops applications when there is nothing > > > going on for a long time, or to conserve power - can anyone tell me how > > > to go about doing this? > > > > Have a look at > > http://www.maemo.org/platform/docs/api/libosso/html/group__Devstate.html#ga2 > > > > Issue osso_display_blanking_pause() in regular intervals to prevent the > > system from shutting down. > > > > Hope this helps, > > Simon > > I tried this method, and it did not work. If the internet connection is > dropped due to inactivity, the app also stops. In addition, I do not > want the screen to stay bright because of potential burn-in - I am > writing an application that will stay running 24/7, and I want it to > keep running whether or not there is user input and whether or not it is > connected. I came up with a workaround that pings a socket every 30 > seconds - that keeps the app running with screen dimming and blanking > still functional. But what do I do if my socket crashes or I lose my > internet connection due to a wireless router malfunction or whatever?? > There must be a method that will intercept the system call to shut the > app off and ignore it, but I have not found such a thing discussed in > the maemo docs. I'm a little bit confused here. There's nothing in the device that would kill the application because of user inactivity. If the socket is closed, it's possible to get a SIGPIPE if you write to the socket, as you know. It could be also killed by the kernel, if it starts to eat all memory from the device. If it's killed after 30s from start, then it's probably the DBus daemon that kills it because it didn't register the correct DBus service name. There is no other 'causes of death' that comes to my mind... In particular, nobody kills you because you are running all the time or because the screen is not tapped by the user. (There is no 'suspend to disk' mode in the device, that would kill processes and restart them on activity. Processes are kept running even when the device is saving power.) BR; Kimmo > > Can anyone enlighten me on this problem? > > _______________________________________________ > maemo-developers mailing list > maemo-developers at maemo.org > https://maemo.org/mailman/listinfo/maemo-developers
- Previous message: [maemo-developers] How to keep app running indefinitely
- Next message: [maemo-developers] How to keep app running indefinitely
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]