/dev/dsp: Device busy

Cordula's Web cpghost at cordula.ws
Sat Jan 24 09:03:04 PST 2004


> > > /dev/dsp: Device busy
> > esd is the culprit.
> But esd is not running...  I checked it with ps.  

I'm having the same problem with mpg123, which uses esd:

$ ps ax|grep esd
$ mpg123 somefile.mp3
/dev/dsp: Device busy
audio: Device busy
$ ps ax|grep esd
11041  ??  Ss     0:00.14 esd -terminate -nobeeps -as 2 -spawnfd 5
$ kill 11041
$ ps ax|grep esd
$ mpg123 somefile.mp3

This happens every time. It's definitively esd that doesn't let
go of /dev/dsp, and for some reason, can't accept connections
on its unix socket /tmp/.esd/socket. It's perhaps related to
permissions (who starts esd)? I dunno exactly.

I'm using a brute-force work-around here:

#!/bin/sh
# playmp3.sh -- brute force mpg123 (Bug: /dev/dsp: Device busy)
until (mpg123 "$1")
do
  sleep 1;
done

Ugly, but better than nothing.

-- 
Cordula's Web. http://www.cordula.ws/



More information about the freebsd-questions mailing list