diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2011-04-08 08:50:48 +0200 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2011-12-06 08:39:18 -0800 |
commit | 177ba8cb42ed6d232e7c8bcad5e6ee21fc51a0e8 (patch) | |
tree | 03f7fbd00c889bd2069b088f769e53ff9cfd40e9 /libc/unistd/pathconf.c | |
parent | e4a21c89a8b24b32f7a2637b45522dfa59f2aaa4 (diff) | |
download | bionic-177ba8cb42ed6d232e7c8bcad5e6ee21fc51a0e8.zip bionic-177ba8cb42ed6d232e7c8bcad5e6ee21fc51a0e8.tar.gz bionic-177ba8cb42ed6d232e7c8bcad5e6ee21fc51a0e8.tar.bz2 |
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
Diffstat (limited to 'libc/unistd/pathconf.c')
0 files changed, 0 insertions, 0 deletions