Re: esound (esd), 2.4.[12] chopped up sound -- solved

Ion Badulescu
2001-03-20T23:21:56Z

On Tue, 20 Mar 2001 15:19:37 -0500, Doug Ledford <dledford@redhat.com> wrote:

> Why would esd get a short write() unless it is opening the file in non
> blocking mode (which I didn't see when I was working on the i810 sound
> driver)? If esd is writing to a file in blocking mode and that write is
> returning short, then that sounds like a driver bug to me.

No, it's not a bug. It would be a bug if esd was writing to a *real* file
or if the write() returned -1 and an errno of EAGAIN. But incomplete writes
are very much ok.

Just try opening /dev/tty and see how it won't take writes of more than
2k (iirc). And that's not just on Linux, I've tested on Solaris and BSD
as well -- though it was a while ago.

Ion

--
It is better to keep your mouth shut and be thought a fool,
than to open it and remove all doubt.