Commit eab063d2 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

Separate java stdio from native stdio

base/core/java/com/android/internal/os/RuntimeInit.java redirectLogStreams()
is closing file descriptors for STDOUT and STDERR, and they're getting replaced
by inappropriate FDs.

hammerhead:/ # ps | grep systemui
u0_a24    1176  206   1118388 95684 sys_epoll_ b60f2b14 S com.android.systemui
hammerhead:/ # ls -la /proc/1176/fd/[012]
lrwx------ 1 u0_a24 u0_a24 64 1970-09-12 10:42 /proc/1176/fd/0 -> /dev/null
lrwx------ 1 u0_a24 u0_a24 64 1970-09-12 10:42 /proc/1176/fd/1 -> /dev/binder
lrwx------ 1 u0_a24 u0_a24 64 1970-09-12 10:42 /proc/1176/fd/2 -> anon_inode:[eventfd]

Don't directly expose STDIN/STDOUT/STDERR to java. Instead, operate
on a copy of the FDs.

Change-Id: I466605758e3bbd117d943799506de1f21eb2fd19
parent f043b663
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment