if (is_healthy()) {
string path = m_cct->_conf->heartbeat_file;
if (path.length()) {
- int fd = ::open(path.c_str(), O_WRONLY|O_CREAT, 0644);
+ int fd = ::open(path.c_str(), O_WRONLY|O_CREAT|O_CLOEXEC, 0644);
if (fd >= 0) {
::utimes(path.c_str(), NULL);
::close(fd);