prevent run_this_before_play_begins or run_this_after_play_ends holding the RTSP port open

This commit is contained in:
Mike Brady
2016-06-27 21:05:37 +01:00
parent 77bf4c0107
commit a107a459d1
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.50])
AC_INIT([shairport-sync], [2.8.4.2], [mikebrady@eircom.net])
AC_INIT([shairport-sync], [2.8.4.3], [mikebrady@eircom.net])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([shairport.c])
AC_CONFIG_HEADERS([config.h])
+6
View File
@@ -1838,6 +1838,12 @@ void rtsp_listen_loop(void) {
// strerror(errno));
continue;
}
// Set the RTSP socket to close on exec() of child processes
// otherwise background run_this_before_play_begins or run_this_after_play_ends commands
// that are sleeping prevent the daemon from being restarted because
// the listening RTSP port is still in use.
// See: https://github.com/mikebrady/shairport-sync/issues/329
fcntl(fd, F_SETFD, FD_CLOEXEC);
ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes));
#ifdef IPV6_V6ONLY