how to run a native daemon process ???

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

how to run a native daemon process ???

Postby oceanfloor » Wed Mar 10, 2010 9:26 am

Hello, everyone :)

i' wanna execute/kill my daemon process using some functions such as property_set("ctl.start, <daemon name>");
or property_set("ctl.stop", <daemon_name>);.
so i added "service statement" to "/init.rc" as following.
(refer to http://pdk.android.com/online-pdk/guide/bring_up.html)

cf) my daemon name is "echod" that has a brief echo system.
and i use ADP1

=====init.rc======
...
service echod /system/bin/echod
disabled
oneshot
===============


after all boot processes,
i run as following

===============
$ adb shell
# start echod # same as property_set("ctl.start", "echod");
===============

Consequently, "echod" is running.
i confirmed with ps command.

BUT!!!
it is a wonder that the state of "echod" was "stopped"
when i run "getprop" command in the android shell.

ex)
===============
$ adb shell getprop | grep echod
[init.svc.echod]: [stopped]
===============

i expected its state is "runnning" but....:(


also it is not working to run property_set("ctl.stop", "echod");
still it has "stopped" state and is running




help me...
thanks.
oceanfloor
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Mar 10, 2010 8:40 am

Top

Return to General

Who is online

Users browsing this forum: No registered users and 7 guests