Mercurial > dovecot > core-2.2
view src/lib/safe-mkdir.h @ 19604:c996bc091c6b
master: Do not close stdout if going foreground
This lets one to use /dev/stdout for logging. Mainly
useful for testing purposes where we can generate
log output to stdout and use tee to write it to a
file for later examination.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Mon, 18 Jan 2016 15:50:23 +0200 |
parents | e4eb71ae8e96 |
children |
line wrap: on
line source
#ifndef SAFE_MKDIR_H #define SAFE_MKDIR_H /* Either create a directory or make sure that it already exists with given permissions. If anything fails, the i_fatal() is called. Returns 1 if directory was created, 2 if it already existed with correct permissions, 0 if we changed permissions. */ int safe_mkdir(const char *dir, mode_t mode, uid_t uid, gid_t gid); #endif