Commit 60ecfb1b by Jakub Jelinek Committed by Jakub Jelinek

* mkstemps.c (mkstemps): Keep looping even for EISDIR.

From-SVN: r138436
parent 1ea5e949
2008-07-31 Jakub Jelinek <jakub@redhat.com>
* mkstemps.c (mkstemps): Keep looping even for EISDIR.
2008-07-31 Denys Vlasenko <dvlasenk@redhat.com> 2008-07-31 Denys Vlasenko <dvlasenk@redhat.com>
* mkstemps.c (mkstemps): If open failed with errno other than * mkstemps.c (mkstemps): If open failed with errno other than
......
...@@ -127,7 +127,11 @@ mkstemps (char *pattern, int suffix_len) ...@@ -127,7 +127,11 @@ mkstemps (char *pattern, int suffix_len)
if (fd >= 0) if (fd >= 0)
/* The file does not exist. */ /* The file does not exist. */
return fd; return fd;
if (errno != EEXIST) if (errno != EEXIST
#ifdef EISDIR
&& errno != EISDIR
#endif
)
/* Fatal error (EPERM, ENOSPC etc). Doesn't make sense to loop. */ /* Fatal error (EPERM, ENOSPC etc). Doesn't make sense to loop. */
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment