Rabin Vincent 177ba8cb42 Prevent deadlock when using fork
When forking of a new process in bionic, it is critical that it
does not allocate any memory according to the comment in
java_lang_ProcessManager.c:
"Note: We cannot malloc() or free() after this point!
A no-longer-running thread may be holding on to the heap lock, and
an attempt to malloc() or free() would result in deadlock."
However, as fork is using standard lib calls when tracing it a bit,
they might allocate memory, and thus causing the deadlock.
This is a rewrite so that the function cpuacct_add, that fork calls,
will use system calls instead of standard lib calls.

Signed-off-by: christian bejram <christian.bejram@stericsson.com>

Change-Id: Iff22ea6b424ce9f9bf0ac8e9c76593f689e0cc86
2011-12-06 08:39:18 -08:00
2011-12-06 08:39:18 -08:00
2011-09-28 12:17:34 -07:00
2011-11-29 17:01:08 -08:00
2010-03-08 18:04:02 -08:00
Description
No description provided
25 MiB
Languages
C 68.1%
Assembly 16.2%
C++ 13.4%
Makefile 1.1%
Python 0.9%
Other 0.2%