Hi fadden,

Thank you for your reply.

I tried to close all threads in Vxwork and seems that my sample with 2
threads (one sleep 4s and call System.exit and one thread sleep 10s)
run successfully.

However on Vxworks, when exiting a thread, it does not free its
resource. So for example I create a server socket on Java

server = new ServerSocket(port);

and make it listening. After I terminate this thread in native, server
socket I created still alive.

Could you let me know how can I close all listening server sockets (if
have) in Dalvik? (I would like to close all of them in my modified
System.exit() too)?

Would you suggest me an implement that I can close all listening
server sockets of Java app (if have) in Dalvik?

Thanks so much
BR



On Jul 22, 12:18 am, fadden <[email protected]> wrote:
> On Jul 21, 7:27 am, Mercury <[email protected]> wrote:
>
> > So maybe we need to adapt the current implement ofSystem.exiton
> > Vxwork, I think we need to save all created threads and when
> >System.exitis called, we need to loop and exit every created thread
> > to exit Dalvik completely. But at the current I do not know how to do
> > it.
>
> That would likely be something specific to vxworks, with which I am
> not familiar.
>
> > Did Dalvik save all created threads and where they are saved? and how
> > can we exit for every created thread?
>
> If vxworks has a UNIX-like process model you can just send a signal to
> the entire process group (kill(-getpgid(), SIGKILL).
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to