Logo Search packages:      
Sourcecode: leafnode version File versions

int safe_mkstemp ( char *  templ  ) 

Safe mkstemp replacement. Ensures the file is only read- and writable by its owner; some systems create these with 0777 or 0666 permissions.

templ  template to build filename upon, as for mkstemp

Definition at line 163 of file lockfile.c.

Referenced by try_lock().

    mode_t oldmask;
    int ret;

    oldmask = umask(077);
    ret = mkstemp(templ);

    return ret;

Generated by  Doxygen 1.6.0   Back to index