]> git.ipfire.org Git - thirdparty/asterisk.git/commit
localtime: Fix file descriptor leak on kqueue(2) systems
authorMatthew Jordan <mjordan@digium.com>
Tue, 10 Mar 2015 17:42:57 +0000 (17:42 +0000)
committerMatthew Jordan <mjordan@digium.com>
Tue, 10 Mar 2015 17:42:57 +0000 (17:42 +0000)
commitbb03580dd521d8c0716ef81c0855d0cd03666138
tree5ee72db8025b5461c53d9c789a36d0f5aec196ba
parent3e6e5a977eb423b2dd163d55d4b371c9e9c80807
localtime: Fix file descriptor leak on kqueue(2) systems

The localtime management in the Asterisk core contains a thread that watches
for changes in the local timezone. On systems where the directory containing
/etc/localtime is modified frequently, the thread monitoring the changes will
be woken up to determine if any changes in timezone have occurred. When using
kqueue(2), this can cause a leak of file descriptors due to some improper
management of resources.

This patch updates the kqueue(2) handling in localtime, such that is no longer
leaks resources.

Review: https://reviewboard.asterisk.org/r/4450/

ASTERISK-24739 #close
Reported by: Ed Hynan
patches:
  11.15.0-u.diff uploaded by Ed Hynan (Licnese 6680)
  11.7.0-u.diff uploaded by Ed Hynan (License 6680)
  svn-trunk-Jan-26-2015-u.diff uploaded by Ed Hynan (License 6680)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@432691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/stdtime/localtime.c