errno was set to EBADF with a call to fopen (non-existing-file, "re") instead of ENOENT. The problem was a missing check. Fixed with the appended patch, Andreas 2011-08-19 Andreas Jaeger [BZ #13114] * libio/fileops.c (_IO_new_file_fopen): Fix handling of non-existant file when using closeexec mode. -- Andreas Jaeger, Program Manager openSUSE aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126