By default, if the parent of a process dies, the process gets SIGHUP
and is supposed to shut down. This however doesn't work for MPD,
because MPD redefines SIGHUP with a different meaning (like most
daemons do).
To work around this, we configure the kernel to send SIGTERM instead
of SIGHUP.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1706
Fixes a busy loop in BufferingInputStream::RunThreadLocked() because
the method never learns that seeking is ignored, even though the HTTP
stream is already broken and can never be read; nobody cared to check
for errors.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1727
If the environment variable $HOME does not exist, don't attempt to
obtain it from /etc/passwd; without $HOME, the calling process
indicates that it does not wish MPD to access the home directory.
This also prevents MPD from attempting to load
`/root/.config/mpd/mpd.conf` if MPD got started as global systemd
service. Reading from there makes no sense, only /etc/mpd.conf shall
be used then.
This piece of code was initially added by commit 5d85792178.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1687
When drop_start_samples and drop_end_samples overlap and are greater
than the actual number of samples, the `num_samples` calculation in
SubmitPCM() could underflow.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1712
Fix build with Boost 1.81.0. `<array>` was included by one of those boost headers,
however, it's no longer included as of Boost 1.81.0.
`master` doesn't use `std::array` in this file.
While we're at it, add all necessary inclusion files.
These settings do not work if CURL was compiled with
CURL_DISABLE_PROXY, and cause error "An unknown option was passed in
to libcurl".
Fixes regression by commit 7ab0dfc8ce
Of course, mode=0700 is more secure, but allowing other users access
to new directories is a choice the user should make via umask(). If
the user-chosen umask allows everybody access, MPD should probably
respect that.