Re: Device deadlock.

Richard B. Johnson (root@chaos.analogic.com)
Tue, 24 Aug 1999 14:37:13 -0400 (EDT)


On Tue, 24 Aug 1999, Peter Enderborg wrote:

> I have a program that sends midi events to the /dev/midi0 device.
>
> It open the device with open() for read/write. Sometimes it sends a lot of events
>
> and the device stops send. (Nonblocking) Then the device is dead. I stop the process and
>
> trying open the device and it is stil busy. The hardware is SB16 or SB128 PCI.
>
> Im thinking of sending some IOCTL to give it a reset signal, but I cant send IOCTL
>
> the device is busy. Ugly deadlock...
>
include <fcntl.h>

fd = open("/dev/midi0", O_RWDR|O_NONBLOCK);

Doesn't this work?

Cheers,
Dick Johnson
**** FILE SYSTEM WAS MODIFIED ****
Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/