libjpeg-ocloexec
authorAnas Nashif <anas.nashif@intel.com>
Thu, 22 Nov 2012 13:44:51 +0000 (05:44 -0800)
committerManuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Mon, 5 Jan 2015 14:20:40 +0000 (15:20 +0100)
commitfd06853fa4313cbe589850f40b4d38ee6fd6ca85
treefea151ad8068d44e8c35e70b2a8188a91d87b71d
parente905413495883916a3f507528b21ab3ab897a6ed
libjpeg-ocloexec

This patch causes libjpeg to open all files with O_CLOEXEC
the "e" fopen mode is a glibc/linux specific feature hence
not suitable for other OS.

Note that it is NOT HANDLED GRACEFULLY on kernels older than
2.6.23 or glibc < 2.7.x and WILL segfault.

The other alternative, using fcntl with FD_CLOEXEC is NOT
enough to prevent race conditions.
bmp.c
cdjpeg.h
rdswitch.c
wrjpgcom.c