- restore the 10 second sleep in the watchdog thread by using
nanosleep(2) instead of usleep(3), which is limited to 1 second. - stop clients from getting "zombified" after connection graph changes by ignoring errors from read(2)ing data that isn't used.
This commit is contained in:
parent
3ef9647bc6
commit
56ff75c711
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.2 2008/03/24 21:45:14 jakemsr Exp $
|
||||
# $OpenBSD: Makefile,v 1.3 2008/03/30 08:46:15 jakemsr Exp $
|
||||
|
||||
SHARED_ONLY = Yes
|
||||
|
||||
COMMENT = low latency sound server
|
||||
|
||||
DISTNAME = jack-0.109.10.1133
|
||||
PKGNAME = ${DISTNAME}p0
|
||||
PKGNAME = ${DISTNAME}p1
|
||||
|
||||
SHARED_LIBS += jack 0.0 # 0.28
|
||||
SHARED_LIBS += jackserver 0.0 # 0.28
|
||||
|
@ -1,16 +1,25 @@
|
||||
$OpenBSD: patch-jackd_engine_c,v 1.1.1.1 2008/03/24 03:01:28 jakemsr Exp $
|
||||
$OpenBSD: patch-jackd_engine_c,v 1.2 2008/03/30 08:46:15 jakemsr Exp $
|
||||
--- jackd/engine.c.orig Tue Mar 18 03:24:21 2008
|
||||
+++ jackd/engine.c Fri Mar 21 00:01:11 2008
|
||||
@@ -912,7 +912,7 @@ jack_watchdog_thread (void *arg)
|
||||
+++ jackd/engine.c Sat Mar 29 19:15:00 2008
|
||||
@@ -908,11 +908,16 @@ static void *
|
||||
jack_watchdog_thread (void *arg)
|
||||
{
|
||||
jack_engine_t *engine = (jack_engine_t *) arg;
|
||||
+ struct timespec timo;
|
||||
|
||||
+ /* JACKD_WATCHDOG_TIMEOUT is specified in msec */
|
||||
+ timo.tv_sec = JACKD_WATCHDOG_TIMEOUT / 1000;
|
||||
+ timo.tv_nsec = (JACKD_WATCHDOG_TIMEOUT - (timo.tv_sec * 1000)) * 1000;
|
||||
+
|
||||
engine->watchdog_check = 0;
|
||||
|
||||
while (1) {
|
||||
- usleep (1000 * JACKD_WATCHDOG_TIMEOUT);
|
||||
+ usleep (100 * JACKD_WATCHDOG_TIMEOUT);
|
||||
+ nanosleep (&timo, NULL);
|
||||
if (!engine->freewheeling && engine->watchdog_check == 0) {
|
||||
|
||||
jack_error ("jackd watchdog: timeout - killing jackd");
|
||||
@@ -1468,10 +1468,8 @@ jack_server_thread (void *arg)
|
||||
@@ -1468,10 +1473,8 @@ jack_server_thread (void *arg)
|
||||
(engine, pfd[i].fd)) {
|
||||
jack_error ("could not handle external"
|
||||
" client request");
|
||||
@ -23,7 +32,7 @@ $OpenBSD: patch-jackd_engine_c,v 1.1.1.1 2008/03/24 03:01:28 jakemsr Exp $
|
||||
select does not return any error,
|
||||
POLLIN is true and the next read
|
||||
will return 0 bytes. This
|
||||
@@ -1481,7 +1479,7 @@ jack_server_thread (void *arg)
|
||||
@@ -1481,7 +1484,7 @@ jack_server_thread (void *arg)
|
||||
and remove the client.
|
||||
*/
|
||||
jack_client_disconnect(engine, pfd[i].fd);
|
||||
|
12
audio/jack/patches/patch-libjack_client_c
Normal file
12
audio/jack/patches/patch-libjack_client_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-libjack_client_c,v 1.1 2008/03/30 08:46:15 jakemsr Exp $
|
||||
--- libjack/client.c.orig Sat Mar 29 21:30:38 2008
|
||||
+++ libjack/client.c Sat Mar 29 21:50:43 2008
|
||||
@@ -1533,7 +1533,7 @@ jack_wake_next_client (jack_client_t* client)
|
||||
jack_error ("cannot complete execution of the "
|
||||
"processing graph (%s)",
|
||||
strerror(errno));
|
||||
- return -1;
|
||||
+ // return -1;
|
||||
}
|
||||
|
||||
return 0;
|
Loading…
Reference in New Issue
Block a user