Open ensc opened 1 year ago
To increase thread safety, the rrd files should be opened with O_CLOEXEC. Else, the fd might leak to programs which are started by execv() in other threads.
O_CLOEXEC
execv()
Atm, only
openat(AT_FDCWD, "/log/iftraf/ext0.rrd", O_RDWR) = 4
is used which is prone for races
can you provide a PR?
To increase thread safety, the rrd files should be opened with
O_CLOEXEC
. Else, the fd might leak to programs which are started byexecv()
in other threads.Atm, only
is used which is prone for races