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 <luigi@labinfo.iet.unipi.it>
This commit is contained in:
Nate Williams 1998-02-21 17:51:39 +00:00
parent 2d67fcee71
commit 68c4406a91
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33716

View file

@ -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)