Commit 9629bca1 authored by Daniel Black's avatar Daniel Black

MDEV-8743: use O_CLOEXEC (innodb/xtradb)

parent 7cec6857
......@@ -1184,10 +1184,10 @@ os_file_create_simple_func(
}
if (create_mode == OS_FILE_CREATE) {
file = open(name, create_flag, S_IRUSR | S_IWUSR
file = open(name, create_flag | O_CLOEXEC, S_IRUSR | S_IWUSR
| S_IRGRP | S_IWGRP);
} else {
file = open(name, create_flag);
file = open(name, create_flag | O_CLOEXEC);
}
if (file == -1) {
......@@ -1631,7 +1631,7 @@ os_file_create_func(
}
#endif /* O_SYNC */
file = open(name, create_flag, os_innodb_umask);
file = open(name, create_flag | O_CLOEXEC, os_innodb_umask);
if (file == -1) {
*success = FALSE;
......
......@@ -1286,10 +1286,10 @@ os_file_create_simple_func(
}
if (create_mode == OS_FILE_CREATE) {
file = open(name, create_flag, S_IRUSR | S_IWUSR
file = open(name, create_flag | O_CLOEXEC, S_IRUSR | S_IWUSR
| S_IRGRP | S_IWGRP);
} else {
file = open(name, create_flag);
file = open(name, create_flag | O_CLOEXEC);
}
if (file == -1) {
......@@ -1752,7 +1752,7 @@ os_file_create_func(
}
#endif /* O_SYNC */
file = open(name, create_flag, os_innodb_umask);
file = open(name, create_flag | O_CLOEXEC, os_innodb_umask);
if (file == -1) {
*success = FALSE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment