lkml.org 
[lkml]   [1999]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Device deadlock.
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:53    [W:2.729 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site