[maemo-developers] [maemo-developers] How to keep app running indefinitely
From: Steven Hill steveh at shscientific.comDate: Mon Mar 13 08:14:15 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 Thu, 2006-09-03 at 12:01 +0200, Kalle Valo wrote: > "Steven Hill" <steveh at shscientific.com> writes: > > > I tried this method, and it did not work. If the internet connection is > > dropped due to inactivity, the app also stops. > > Like Kimmo said, there shouldn't be anything killing you application. > This smells like a bug. Let's try find it, but to do that you have to > provide some more information. Can you get any output from your > application. Does it crash or what? Are there any errors and if yes, > what? Do you use libosso-ic-preload.so library with LD_PRELOAD, > osso_socket() or IC API? I use the osso-iap-connect method to open a connection (the IC API) > > Please note that with the first two methods (libosso-ic-preload.so and > osso_socket() all sockets are closed with shutdown(2) if the Internet > connection is dropped. Does your application handle this gracefully? > This is the first thing I would check. > > (With IC API this doesn't happen, with that method it's the > applications responsibility to close the sockets.) > > > 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?? > > I agree, that's just a hack and nowhere near a proper solution. > Applications shouldn't die when connections drop. With mobile devices > connections drop all the time and we need to handle it properly. > > BTW, are you aware of that you disable connection idle timer from the > Connectivity Control Panel applet? OK, I think you just solved my problem - I had the WLAN idle time set to 60 minutes, and I did an experiment to see how long my connection lasted, and it was exactly 60 minutes. I will set my WLAN idle time to unlimited, and I bet I will not lose my connection. > > > 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. > > You assume that this is a desired functionality, but it's not. There's > a bug somewhere, that just needs to be found. We don't kill > applications just for fun :) Thanks for replying - see my replies to your comments above - I will verify that setting WLAN idle time to unlimited solves my problem.
- 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 ]