OSDN Git Service

bionic: call stdio cleanup on exit
authorPawit Pornkitprasan <p.pawit@gmail.com>
Thu, 14 Nov 2013 16:50:45 +0000 (23:50 +0700)
committerPawit Pornkitprasan <p.pawit@gmail.com>
Tue, 19 Nov 2013 02:49:17 +0000 (09:49 +0700)
commit652289942d0d2543af90c8af9c04d80a2edb481a
tree3ea6d3332a690d66cb8fc7ea9efca89b1ce678a5
parentae5c3dd73844e6a9e1a14dbf893eab5142902f18
bionic: call stdio cleanup on exit

As of 61e699a133a4807fe878a6cb0d7190d7c96e21f8, stdio clean up
functions are no longer registered in atexit and must be called
manually via __cleanup.

The issue this fixes is some static binaries linked against bionic
cannot output properly when piped or redirected because the buffer
is not flushed before closing.

This is done by pulling in exit.c (and other dependencies) from
netbsd.

Change-Id: I193e54a6d08900f291550029fe75ce76394d9e22
libc/Android.mk
libc/upstream-netbsd/libc/stdlib/exit.c [moved from libc/stdlib/exit.c with 71% similarity]
libc/upstream-netbsd/libc/thread-stub/__isthreaded.c [new file with mode: 0644]