aboutsummaryrefslogtreecommitdiffstats
path: root/src/main_notify.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-24 07:14:11 +0200
committerMax Kellermann <max@duempel.org>2008-09-24 07:14:11 +0200
commita0272c2d615e4579e8efb767cc6c28302b2c92cd (patch)
treef8868d8df4a4fd6defbb17db3d5d438903cbeff5 /src/main_notify.c
parentee1d723ad7ec94e0db09ae8bab61a8952bfaaa32 (diff)
downloadmpd-a0272c2d615e4579e8efb767cc6c28302b2c92cd.tar.gz
mpd-a0272c2d615e4579e8efb767cc6c28302b2c92cd.tar.xz
mpd-a0272c2d615e4579e8efb767cc6c28302b2c92cd.zip
notify: added notify_deinit()
Destroy the mutex when it is not used anymore.
Diffstat (limited to '')
-rw-r--r--src/main_notify.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main_notify.c b/src/main_notify.c
index d7f429f0f..4e5b786a2 100644
--- a/src/main_notify.c
+++ b/src/main_notify.c
@@ -68,6 +68,14 @@ void init_main_notify(void)
notify_init(&main_notify);
}
+void deinit_main_notify(void)
+{
+ notify_deinit(&main_notify);
+ deregisterIO(&main_notify_IO);
+ xclose(main_pipe[0]);
+ xclose(main_pipe[1]);
+}
+
static int wakeup_via_pipe(void)
{
int ret = pthread_mutex_trylock(&select_mutex);