NuwaTemplateProcess: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 18: Line 18:
* __wrap_pthread_key_delete()
* __wrap_pthread_key_delete()
in BionicGlue.cpp.
in BionicGlue.cpp.
== Thread ID ==
== PIPE and Socketpair ==
For B2G, a lot of PIPEs and sockets are used for synchronization between threads for dispatching tasks among threads.  For Linux, file descriptors will be shared after a fork without out a CLOEXEC.  It is fine for normal file but not for communication channels.  So, PIPEs and sockets should be recreated.  Nuwa remember what pipes and socketpairs are created by Nuwa process and create new ones for them for each parasited process.  Since file descriptors of new PIPEs and sockets are not the same as what in Nuwa process, dup2() is called for replace the file description of old file descriptor by the a new PIPE or socket.


== Mutics and Conditions ==
== Mutics and Conditions ==
Line 24: Line 29:


== Binder ==
== Binder ==
== IPC ==
== Defense ==
Confirmed users
398

edits

Navigation menu