Changeset 61 for trunk


Ignore:
Timestamp:
2006-06-05T07:13:34+02:00 (9 years ago)
Author:
moo
Message:

refix to unlink correctly for newly created files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mmap.c

    r59 r61  
    167167    fd = open(shm->name, O_RDWR, XCACHE_MMAP_PERMISSION);
    168168    if (fd == -1) {
     169        /* do not create file in /dev */
     170        if (strncmp(shm->name, "/dev", 4) == 0) {
     171            goto err;
     172        }
    169173        fd = open(shm->name, O_CREAT | O_RDWR, XCACHE_MMAP_PERMISSION);
    170174        shm->newfile = 1;
     
    172176            goto err;
    173177        }
    174     }
    175     if (strncmp(shm->name, "/tmp", 4) == 0) {
    176         shm->newfile = 0;
    177178    }
    178179    ftruncate(fd, size);
Note: See TracChangeset for help on using the changeset viewer.