]> git.ipfire.org Git - thirdparty/asterisk.git/commit
test_time: Provide a timeout when waiting. 76/1876/1
authorJoshua Colp <jcolp@digium.com>
Mon, 28 Dec 2015 20:02:19 +0000 (16:02 -0400)
committerJoshua Colp <jcolp@digium.com>
Mon, 28 Dec 2015 20:11:05 +0000 (14:11 -0600)
commita2804007585aca2aa0100d12dfa3413efeb084a5
tree1a8aeaedc532d96134e57d7e8e9122e33c6d81c0
parent5e99ba393ec59a17dd7c810367e456725e377072
test_time: Provide a timeout when waiting.

The test_timezone_watch unit test is written to expect a
condition to be signaled when the inotify daemon thread runs.
There exists a small window where the test_timezone_watch
thread can signal the inotify daemon thread while it is not
reading on the underlying file descriptor. If this occurs
the test_timezone_watch thread will wait indefinitely for a
signal that will never arrive.

This change adds a timeout to the condition so it will return
regardless after a period of time.

Change-Id: Ifed981879df6de3d93acd3ee0a70f92546517390
main/stdtime/localtime.c