Prevent demon form being killed, when device goes to SLEEP

by P@AR » Wed, 16 Feb 2011 02:09:39 GMT

Sponsored Links
 Hello, I need help over here!
Hi I am developing a Linux application(deamon) written in C, for my
Android device.
I have configured my init.rc script to start the deamon when the
device is booted.
Everything works just fine when the device is booted and my demon
starts, but when the device "sleeps"(after ~30seconds)
it kills my deamon application. Do you have any Idea how to prevent my
deamon from being "killed"?
I want to make my deamon to be active all the time, just like other
processes (adb, init, .... etc)
Any idea, suggestion would help ???


Re: Prevent demon form being killed, when device goes to SLEEP

by raja pavan » Wed, 16 Feb 2011 12:53:28 GMT

 "Killed" , lowmemorykiller has the power to kill processes, so lmk cuold be
behind this.

write /proc/1/oom_adj -16
This will prevent the lowmemorykiller driver from killing your process (if
lmk happens to be the reason)
Please let me know the result.


Sponsored Links

Re: Prevent demon form being killed, when device goes to SLEEP

by P@AR » Mon, 21 Feb 2011 02:49:21 GMT

 Thanks for your reply.
Tomorrow I'll check if the lmk is the problem
I'll update you as soon as I have the results



Other Threads

1. Problem in ListItem...

can anybody tell how to retrieve the Listitem values from a list view

  For example.....i m having 3 listitems such as 1.India

  if i click india in a listview it should display India...How can i get the
list item value

  Here i m using ListActivity....

  Here is my code....

   String[] items={"India","Australia","America"};

                setListAdapter(new ArrayAdapter<String>(this,

        public void onListItemClick(ListView parent, View v,
        int position, long id) {

            super.onListItemClick(parent, v, position, id);






2. Double-Permissions when publishing to Android Market?

I'm running into a strange issue publishing on the Android market, and
am wondering if anybody else has seen the same:

Basically, whatever permissions I list in my "Android Manifest" file
get listed twice when I upload the APK.  By way of example, here's a
direct copy/paste from the upload area...

This apk requests 6 permissions that users will be warned about

And here are the three relevant lines in my android manifest file
        <uses-permission android:name="android.permission.CALL_PHONE"/>
        <uses-permission android:name="android.permission.READ_CONTACTS"/>
        <uses-permission android:name="android.permission.WRITE_CONTACTS"/>

I've tried uploading in FF3.5, IE7, and IE8, and modified the
permissions tags to end with a space before the trailing /> and
without.  Every permutation of any possible quirk I try to work
around, still ends up with the whole "everything listed twice" issue.
Those three permission tags are direct children of the <manifest> tag.

I don't actually know if this is something I should even care about,
but I did notice earlier today that I couldn't search for my
application ("Contacts Evolved") in the market, wheras I could before
my phone updated to donut... I had to un-publish and re-publish the
app for it to show up again.  It downloads fine now, but still gives
me the feeling that something is "wrong" that might cause issues down
the line, and I'd like to get it fixed.

Any ideas on what's happening, or if it's happened to anybody else,
would be greatly appreciated:)

3. Pixelpipe Post & Upload Lite

4. Did Google fumble the Android 1.6 launch?

5. android store support

6. Looping through contacts with reading each contact default phone

7. bringing an app to the foreground...