OSDN Git Service

Save/restore errno in SIGCHLD handler.
authorChristopher Ferris <cferris@google.com>
Mon, 31 Aug 2015 22:40:01 +0000 (15:40 -0700)
committerChristopher Ferris <cferris@google.com>
Mon, 31 Aug 2015 23:36:14 +0000 (16:36 -0700)
commita8a795428acf5cbe1cd348aa766243203ca78b80
treea0e2e30c8a7c8ade0a5e3215ae7eabac1ef11378
parent7878eee8a9c20752e038f563b98b6b42c372cd0f
Save/restore errno in SIGCHLD handler.

The SIGCHLD handler can set the errno, which can change the errno found
on the thread on which the signal handler is invoked. Most of the time
this is harmless, but it's possible that if the main thread was making
a system call, and allows certain failures based on errno, that logic
can fail. The fix is to save/restore errno in the handler.

Bug: 23572286
Bug: 23689391
Change-Id: I4542fd60cc1398ce0a8902d8df98a3d089fb6efe
core/jni/com_android_internal_os_Zygote.cpp