Lines Matching defs:flags
95 static int gettemp(char *path, apr_file_t **doopen, apr_int32_t flags, apr_pool_t *p)
143 if ((rv = apr_file_open(doopen, path, flags,
176 APR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *template, apr_int32_t flags, apr_pool_t *p)
181 flags = (!flags) ? APR_FOPEN_CREATE | APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_EXCL |
182 APR_FOPEN_DELONCLOSE : flags;
184 return gettemp(template, fp, flags, p);
196 /* XXX: We must reset several flags values as passed-in, since
197 * mkstemp didn't subscribe to our preference flags.
199 * We either have to unset the flags, or fix up the fd and other
201 * calls apr_file_open, our flags are respected in that code path.
203 apr_os_file_put(fp, &fd, flags, p);
206 if (!(flags & APR_FOPEN_NOCLEANUP)) {
207 int flags;
209 if ((flags = fcntl(fd, F_GETFD)) == -1)
212 flags |= FD_CLOEXEC;
213 if (fcntl(fd, F_SETFD, flags) == -1)