umask to be used when creating files. This should change the permissions
of files created using APR_DEFAULT_OS. Also removed a warning introduced
with the sys/stat.h changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85537
13f79535-47bb-0310-9956-
ffa450edef68
}
#ifndef WIN32
- u = umask(022);
- (void) umask(u | 022);
+ u = ap_set_default_fperms(022);
+ (void) ap_set_default_fperms(u | 022);
#endif
if (ap_open(&pid_file, fname, APR_WRITE | APR_CREATE | APR_TRUNCATE,
APR_OS_DEFAULT, p) != APR_SUCCESS) {
exit(1);
}
#ifndef WIN32
- (void) umask(u);
+ (void) ap_set_default_fperms(u);
#endif
ap_fprintf(pid_file, "%ld\n", (long)mypid);
ap_close(pid_file);