platform_system_core/liblog
Nick Kralevich a170322083 liblog: fix fd leakage
File descriptors remain open across an exec unless FD_CLOEXEC is
set.  Add O_CLOEXEC to the open() call to prevent file descriptor
leakage.

In particular, the following program will eventually run out of
file descriptors:

int main(int argc, char **argv) {
  printf("===== entering main =====\n");
  ALOGW("entering main");
  system("ls -l /proc/self/fd/");

  execv(argv[0], argv);
  printf("exec failed\n");
  return -1;
}

Change-Id: I5be43ab3b9f82a05f242b1f586454c50568af388
2013-03-15 09:48:32 -07:00
..
Android.mk Make a liblog.so for the host too. 2012-05-03 16:04:57 -07:00
event_tag_map.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
fake_log_device.c Fixed two 64-bit porting issues; Make pid/tid type consistent 2012-02-29 17:00:46 -08:00
logd_write.c liblog: fix fd leakage 2013-03-15 09:48:32 -07:00
logprint.c Fixed two 64-bit porting issues; Make pid/tid type consistent 2012-02-29 17:00:46 -08:00
NOTICE Automated import from //branches/donutburger/...@140818,140818 2009-03-24 18:36:55 -07:00