Max Kellermann
148aca23be
use SPDX IDs, replacing the long copyright headers
2023-03-06 14:59:48 +01:00
Max Kellermann
c83ab0dc58
unix/SignalHandlers: shut down if parent process dies in --no-daemon mode
...
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
2023-03-06 13:00:07 +01:00
Dave Hocker
f248fe2dec
Resolve deprecation warnings by replacing use of sprintf with FmtBuffer
2023-02-06 11:56:49 +01:00
Max Kellermann
fa58db798b
lib/fmt/RuntimeError: new library
...
Replacing FormatRuntimeError().
2022-11-29 14:10:34 +01:00
Max Kellermann
66029c405f
system/FmtError: move to lib/fmt/
2022-11-28 23:09:27 +01:00
Max Kellermann
96ae659fdf
system/FmtError: new library
...
Replaces the Format*() functions in system/Error.hxx.
2022-11-28 21:56:12 +01:00
Max Kellermann
cc0def15c4
Copyright year 2022
2022-07-14 17:59:35 +02:00
Max Kellermann
f510564d9d
more [[gnu::...]] attributes
2021-10-13 12:07:05 +02:00
Max Kellermann
5348f8c9c8
copyright year 2021
2021-01-01 19:54:28 +01:00
Rosen Penev
3540cf26b1
replace exit and _exit with std variants
...
_exit and std::_Exit are identical, expect the latter is standard C++.
Added several functions to the std namespace as a result of headers.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-26 18:44:09 -07:00
Rosen Penev
591f51f3d3
replace noreturn attribute with standard C++ version
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:08:18 -07:00
Rosen Penev
69a51e12c9
replace signal.h with csignal.h
...
The former was deprecated with C++14. The standard says they are the same:
The contents of the header<csignal>are the same as the C standard library
header<signal.h>.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 18:56:51 -07:00
Rosen Penev
ab9f5d2067
replace assert.h with cassert
...
The former was deprecated with C++14.
According to the C++11 and C++17 standards, both files are identical.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:25:38 -07:00
Max Kellermann
d1cc73775f
Instance: flush input cache on SIGHUP
2020-02-17 15:23:05 +01:00
Max Kellermann
29d05cdb8e
unix/SignalHandlers: pass Instance to ...Init()
2020-02-17 15:23:03 +01:00
Rosen Penev
568deefd68
[clang-tidy] remove pointless void arg
...
Found with modernize-redundant-void-arg
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:52:38 -08:00
Max Kellermann
4f22f4d357
*: use nullptr instead of NULL
2020-02-01 14:02:43 +01:00
Max Kellermann
2817bf9e95
copyright year 2020
2020-01-18 19:23:49 +01:00
Max Kellermann
d663f81420
include cleanups (powered by iwyu)
2019-07-05 09:59:58 +02:00
Max Kellermann
a139279575
Copyright year 2019
2019-06-17 11:17:30 +02:00
Max Kellermann
096c23f27d
unix/SignalHandlers: add RAII class
2019-02-05 21:36:51 +01:00
Max Kellermann
40bde1eac9
unix/SignalHandlers: add `noexcept`
2019-02-05 21:36:35 +01:00
Max Kellermann
ce49d99c2f
check.h: remove obsolete header
...
Since we switched from autotools to Meson in commit
94592c1406
, we don't need to include
`config.h` early to properly enable large file support. Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.
This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
Max Kellermann
f5c9071494
*: copyright year 2018
2018-10-31 17:54:59 +01:00
Max Kellermann
2a2c5d50ff
unix/PidFile: add "noexcept"
2018-08-01 20:27:56 +02:00
Max Kellermann
dfda0faac7
unix/{Daemon,PidFile}: throw exception on error
...
Don't use the bad `FatalError` library.
2018-08-01 20:20:29 +02:00
Max Kellermann
bbc5212436
fs/AllocatedPath: make the nullptr_t constructor public
2018-01-17 12:17:41 +01:00
Max Kellermann
6246d36fe6
Merge branch 'v0.20.x'
2017-12-16 20:56:06 +01:00
Max Kellermann
dfaf08743c
*: check defined(_WIN32) instead of defined(WIN32)
...
Only _WIN32 is defined by the compiler, and WIN32 is not standardized
and may be missing.
Closes #169
2017-12-12 10:22:20 +01:00
Max Kellermann
d3fd89552f
unix/Signalhandlers: throw exception instead of raising fatal error
2017-08-11 09:37:30 +02:00
Max Kellermann
df5cc3f0f6
fs/FileSystem: OpenFile() returns UniqueFileDescriptor
2017-08-10 19:34:52 +02:00
Max Kellermann
71f0ed8b74
*: add "noexcept" to many, many function prototypes
...
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
2017-05-08 14:44:49 +02:00
Max Kellermann
5900253b85
update copyright year
2017-01-03 20:48:59 +01:00
Max Kellermann
ea0e6d9824
fs/FileSystem: RemoveFile() throws exception on error
2016-08-15 22:25:15 +02:00
Max Kellermann
4280f84535
event/SignalMonitor: use BoundMethod instead of raw function pointer
2016-06-20 10:46:36 +02:00
Max Kellermann
1aee89f5ea
*: include cleanup (using iwyu)
2016-03-01 22:08:13 +01:00
Max Kellermann
1d67aa7bf2
update copyright year to 2016
2016-02-26 17:54:05 +01:00
Max Kellermann
6350089e51
release v0.19.13
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJWzMnGAAoJECNuiljG20US5yYP/jL9A313aMgUO/R8eVGNc7uJ
CwiKROtgd+M47si1qdduzdrPKrFK2tEGYT0El5uQsyDuIsmPB01c3ZqnlM8oO6ca
5tXXJiEvyMkupCEzAajTHqvDCyPx0+o1ektYm9SouAULjOMztIpsVU3oKc8Z78Yc
TkpaRwUjNaekGLf0kATesBYnWkKR7S/TLYKmaKUaPCcK/i2S8YhTC57a1yZjg3lE
w57Kh+tFLZCSiZChk9A5D6w1kKzDgiyNGRYK4F2TRfiQ6hML4F45EFgzfCg+zHi8
+OIE9C1ZQt/NQ6mib+OUWoGuHtfjR20F/OFnQEYvkyXQ32j1sbALe7IHCceX7IHl
U88hcIh2yEr1x3TUaVyYPLze4FBq/Uxv/gFH8FVKTWmcb90MJgXCNFbO3sfO9kk0
KYK0IDoHE9MSmWhblA1FFFHU8VmCMsTN0VhBan+XP2wgXnGX+UvjU7AWJm4Fkwx0
H8uP0Si5wtI9DZ+2SRyGhMfW/+pHsqD+O6PoSSfUyU3ZnPy+cAVEC+67oKJ9pZkA
najeYaMt0Kz88RvLEwNeLkiys62O8aTsBpfjeNfmUAISJzZZbIvC20tyroHrju30
TgbXff2Hnx4q+NQ7nbQN5HMVZ2JLLPMYYw+N0dP41g/ULubHS6btGOVwgTWoFwBo
i2L1uscoD1ONxIEOlIvl
=X7s3
-----END PGP SIGNATURE-----
Merge tag 'v0.19.13'
release v0.19.13
2016-02-23 22:13:43 +01:00
Max Kellermann
b3460f3f54
configure.ac, unix/Daemon: check for initgroups() at configure time
...
The initgroups() manpage says we need to check for _BSD_SOURCE. The
thing is that glibc deprecated this macro, and doesn't define it
anymore, effectively breaking all MPD supplementary groups.
The real fix is to check for initgroups() availability at configure
time, instead of relying on the deprecated _BSD_SOURCE macro.
2016-02-23 20:13:34 +01:00
Max Kellermann
f066bb7716
unix/Daemon, playlist/...: remove unused Domain variables
2015-10-16 18:08:59 +02:00
Anthony DeRossi
84ab3ee3af
unix/PidFile: fix empty PID file
...
This was broken by 4f29034f
.
2015-09-30 21:49:18 +02:00
Max Kellermann
ce0d896492
unix/Daemon, playlist/pls, ...: remove unused Domain variables
2015-09-17 23:15:54 +02:00
François Revol
9d176e35d4
unix/Daemon: define WCOREDUMP() for platforms that don't support it
...
Haiku does not dump core, it just starts the debugger.
2015-09-17 22:46:46 +02:00
Max Kellermann
71fecf4d1f
unix/PidFile: add missing include stdlib.h for strtoul()
2015-08-24 10:40:05 +02:00
Max Kellermann
4f29034f11
unix/PidFile: use raw file descriptor instead of stdio
2015-08-15 16:42:07 +02:00
Max Kellermann
567bf445bf
unix/Daemon: move code to ReadPidFile()
2015-08-15 16:41:22 +02:00
Max Kellermann
28a0c46ca7
unix/Daemon: eliminate local variable "ret"
2015-08-15 16:41:21 +02:00
Max Kellermann
39c9669445
fs/Traits: add macro PATH_LITERAL()
2015-03-05 08:58:04 +01:00
Max Kellermann
9ed0152cf2
unix/PidFile: use the UTF-8 path for error message
2015-03-05 08:09:08 +01:00
Max Kellermann
1c90b0c19d
*: change C-style prototypes, drop "(void)"
2015-03-03 20:05:08 +01:00