From 68c4406a91229a21fffbb03bcd0ebca76f99f908 Mon Sep 17 00:00:00 2001 From: Nate Williams Date: Sat, 21 Feb 1998 17:51:39 +0000 Subject: [PATCH] A minor bugfix for my audio driver and pcaudio. The problem is with signals delivered to a process writing to the audio device the system: if you try cat /dev/zero > /dev/dsp (or cat /dev/zero > /dev/pcaudio) and press Ctrl-C : for a second or two the system appears to freeze (e.g. the cursor will disappear if you move the mouse, xclock blocks, etc.). I think that interrupts etc. still run so the problem is not too terrible, but still annoying [ The problems appears to also be in isa/pcaudio.c, though that is ignored ] Submitted by: Luigi Rizzo --- sys/i386/isa/snd/dmabuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/i386/isa/snd/dmabuf.c b/sys/i386/isa/snd/dmabuf.c index 86f930462a4b..a19ccc48500e 100644 --- a/sys/i386/isa/snd/dmabuf.c +++ b/sys/i386/isa/snd/dmabuf.c @@ -270,7 +270,7 @@ dsp_write_body(snddev_info *d, struct uio *buf) else timeout = 1 ; ret = tsleep( (caddr_t)b, PRIBIO|PCATCH, "dspwr", timeout); - if (ret == EINTR) + if (ret == EINTR || ret == ERESTART) d->flags |= SND_F_ABORTING ; splx(s); if (ret == EINTR) @@ -553,7 +553,7 @@ dsp_read_body(snddev_info *d, struct uio *buf) else timeout = 1; /* maybe data will be ready earlier */ ret = tsleep( (caddr_t)b, PRIBIO | PCATCH , "dsprd", timeout ) ; - if (ret == EINTR) + if (ret == EINTR || ret == ERESTART) d->flags |= SND_F_ABORTING ; splx(s); if (ret == EINTR)