diff options
author | DJ Delorie <dj@redhat.com> | 2008-07-31 19:06:35 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2008-07-31 19:06:35 +0000 |
commit | f562800dc425ea951fcde303518467c5424e3b18 (patch) | |
tree | 6f5a3a62085de1a9f9119c89d75bb36414951a4f /libiberty/mkstemps.c | |
parent | ec56be1b4dc25ec39c32ceab997747ad651c9d22 (diff) | |
download | gdb-f562800dc425ea951fcde303518467c5424e3b18.zip gdb-f562800dc425ea951fcde303518467c5424e3b18.tar.gz gdb-f562800dc425ea951fcde303518467c5424e3b18.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/mkstemps.c')
-rw-r--r-- | libiberty/mkstemps.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libiberty/mkstemps.c b/libiberty/mkstemps.c index 6c2e472..093b67a 100644 --- a/libiberty/mkstemps.c +++ b/libiberty/mkstemps.c @@ -127,6 +127,9 @@ mkstemps (char *pattern, int suffix_len) if (fd >= 0) /* The file does not exist. */ return fd; + if (errno != EEXIST) + /* Fatal error (EPERM, ENOSPC etc). Doesn't make sense to loop. */ + break; /* This is a random value. It is only necessary that the next TMP_MAX values generated by adding 7777 to VALUE are different |