1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

s3-pidfile: set the close on exec flag for the created pidfiles.

Guenther
This commit is contained in:
Günther Deschner 2010-05-17 18:22:37 +02:00
parent d6a73ad85b
commit 20537d6516

View File

@ -145,6 +145,9 @@ void pidfile_create(const char *program_name)
}
/* Leave pid file open & locked for the duration... */
SAFE_FREE(name);
/* set the close on exec so that we don't leak the fd */
fcntl(fd, F_SETFD, FD_CLOEXEC);
}
void pidfile_unlink(void)