Commit c32477a2 authored by Max Kellermann's avatar Max Kellermann

Merge branch 'v0.18.x'

parents a0c25941 5e1e9262
...@@ -35,6 +35,14 @@ ver 0.19 (not yet released) ...@@ -35,6 +35,14 @@ ver 0.19 (not yet released)
* allow playlist directory without music directory * allow playlist directory without music directory
* install systemd unit for socket activation * install systemd unit for socket activation
ver 0.18.9 (not yet released)
* decoder
- vorbis: fix linker failure when libvorbis/libogg are static
* encoder
- vorbis: fix another linker failure
* output
- pipe: fix hanging child process due to blocked signals
ver 0.18.8 (2014/02/07) ver 0.18.8 (2014/02/07)
* decoder * decoder
- ffmpeg: support libav v10_alpha1 - ffmpeg: support libav v10_alpha1
......
...@@ -1222,7 +1222,7 @@ if test x$enable_tremor = xyes; then ...@@ -1222,7 +1222,7 @@ if test x$enable_tremor = xyes; then
fi fi
fi fi
MPD_AUTO_PKG(vorbis, VORBIS, [vorbis vorbisfile ogg], MPD_AUTO_PKG(vorbis, VORBIS, [vorbisfile vorbis ogg],
[Ogg Vorbis decoder], [libvorbis not found]) [Ogg Vorbis decoder], [libvorbis not found])
if test x$enable_vorbis = xyes; then if test x$enable_vorbis = xyes; then
AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support]) AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support])
...@@ -1350,7 +1350,7 @@ fi ...@@ -1350,7 +1350,7 @@ fi
AM_CONDITIONAL(ENABLE_SHINE_ENCODER, test x$enable_shine_encoder = xyes) AM_CONDITIONAL(ENABLE_SHINE_ENCODER, test x$enable_shine_encoder = xyes)
dnl ---------------------------- Ogg Vorbis Encoder --------------------------- dnl ---------------------------- Ogg Vorbis Encoder ---------------------------
MPD_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc vorbis], MPD_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc vorbis ogg],
[Ogg Vorbis encoder], [libvorbisenc not found]) [Ogg Vorbis encoder], [libvorbisenc not found])
if test x$enable_vorbis_encoder = xyes; then if test x$enable_vorbis_encoder = xyes; then
......
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
#include <algorithm> #include <algorithm>
#ifdef USE_SIGNALFD
#include <pthread.h>
#endif
#include <assert.h> #include <assert.h>
#include <signal.h> #include <signal.h>
...@@ -94,7 +98,21 @@ static std::atomic_bool signal_pending[MAX_SIGNAL]; ...@@ -94,7 +98,21 @@ static std::atomic_bool signal_pending[MAX_SIGNAL];
static Manual<SignalMonitor> monitor; static Manual<SignalMonitor> monitor;
#ifndef USE_SIGNALFD #ifdef USE_SIGNALFD
/**
* This is a pthread_atfork() callback that unblocks the signals that
* were blocked for our signalfd(). Without this, our child processes
* would inherit the blocked signals.
*/
static void
at_fork_child()
{
sigprocmask(SIG_UNBLOCK, &signal_mask, nullptr);
}
#else
static void static void
SignalCallback(int signo) SignalCallback(int signo)
{ {
...@@ -103,6 +121,7 @@ SignalCallback(int signo) ...@@ -103,6 +121,7 @@ SignalCallback(int signo)
if (!signal_pending[signo].exchange(true)) if (!signal_pending[signo].exchange(true))
monitor->WakeUp(); monitor->WakeUp();
} }
#endif #endif
void void
...@@ -110,6 +129,8 @@ SignalMonitorInit(EventLoop &loop) ...@@ -110,6 +129,8 @@ SignalMonitorInit(EventLoop &loop)
{ {
#ifdef USE_SIGNALFD #ifdef USE_SIGNALFD
sigemptyset(&signal_mask); sigemptyset(&signal_mask);
pthread_atfork(nullptr, nullptr, at_fork_child);
#endif #endif
monitor.Construct(loop); monitor.Construct(loop);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment