CVS patchset: 2310
CVS date: 1998/09/14 18:55:18
- add new fully recursive macro.c
2.5.3 -> 2.5.4:
+ - eliminate infinite loop with missing tmpdir (Trent Jarvi).
- os_canon for CYGWIN32_NT/95.
- rationalize autoconf detection of gzip/bzip2.
- restore backward compatible rpmrc/rpmpopt symlinks.
srand(time(NULL));
ran = rand() % 100000;
+
+ /* maybe this should use link/stat? */
+
do {
sprintf(fn, "%s%s/rpm-tmp.%d", prefix, tmpdir, ran++);
fd = open(fn, O_CREAT | O_RDWR | O_EXCL, 0700);
- } while (fd < 0);
+ } while (fd < 0 && errno == EEXIST);
if (!stat(fn, &sb) && S_ISLNK(sb.st_mode)) {
rpmError(RPMERR_SCRIPT, _("error creating temporary file %s"), fn);