1
0
mirror of http://mpg123.de/trunk/.git synced 2025-08-07 21:02:55 +03:00

mpg123: fix regression of signals for terminal control since 1.31 (get rid of signal())

git-svn-id: svn://scm.orgis.org/mpg123/trunk@5511 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
thor
2025-07-26 20:25:16 +00:00
parent c518844674
commit 67dae4936e
2 changed files with 8 additions and 4 deletions

4
NEWS
View File

@@ -7,6 +7,10 @@
-- The ports/cmake only installs manpages for BUILD_PROGRAMS now. -- The ports/cmake only installs manpages for BUILD_PROGRAMS now.
-- The configure gives better hint if pkg-config was missing during generation -- The configure gives better hint if pkg-config was missing during generation
(bug 378). (bug 378).
- mpg123:
-- Replace usage of signal() in terminal code with our sigaction() wrapper
to fix repeated handling for --sigusr1 and --sigusr2, which got subtly
broken on Linux + glibc by a feature test macro change in mpg123 1.31.
1.33.0 1.33.0
------ ------

View File

@@ -112,10 +112,10 @@ static int term_setup_detail(struct termios *pattern)
{ {
mdebug("setup on fd %d", term_fd); mdebug("setup on fd %d", term_fd);
/* One might want to use sigaction instead. */ INT123_catchsignal(SIGCONT, term_sigcont);
signal(SIGCONT, term_sigcont); INT123_catchsignal(SIGUSR1, term_sigusr);
signal(SIGUSR1, term_sigusr); INT123_catchsignal(SIGUSR2, term_sigusr);
signal(SIGUSR2, term_sigusr);
struct termios tio = *pattern; struct termios tio = *pattern;
tio.c_lflag &= ~(ICANON|ECHO); tio.c_lflag &= ~(ICANON|ECHO);
tio.c_cc[VMIN] = 1; tio.c_cc[VMIN] = 1;