]> git.ipfire.org Git - thirdparty/asterisk.git/commit
test_time: Provide a timeout when waiting. 75/1875/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:02:19 +0000 (16:02 -0400)
commitc8499b8d5adc805efadb91b483d9d987f62891ff
tree3ddf31a4c02a35767487fcdf5ab2f8d27d6dc9cb
parent6929d2a428ad735c21967d62bb5488e44be49582
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