Fix fopen (non-existing-file, "re") errno

Andreas Jaeger aj@suse.de
Fri Aug 19 13:41:00 GMT 2011


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  <aj@suse.de>

	[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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: text/x-patch
Size: 487 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-hacker/attachments/20110819/5585487a/attachment.bin>


More information about the Libc-hacker mailing list