This prevents our logfile from being written by the traced application
(it is bad because it has no permissions to write to our logfile).
Change-Id: Ifa5f097d050cb0d80eaee8097bf10abd5734a4c9
Signed-off-by: Nikita Kalyazin <n.kalyazin@samsung.com>
#if DEBUG
void initialize_log()
{
- int fd = open(DEBUG_LOGFILE, O_WRONLY | O_CREAT | O_TRUNC, 0777);
+ int fd = open(DEBUG_LOGFILE, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC,
+ 0777);
if (fd > 0) {
dup2(fd, 1);
dup2(fd, 2);