[lkml]   [2001]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: kernel threads and close method in a device driver
    Date said:
    > The architecture is currently:
    > open device
    > do IOCTL (spinning a kernel thread and doing initialization)
    > There is currently an IOCTL which short-circuits to the close method.
    > Turns out it seems necessary to do this IOCTL -- close never gets
    > invoked.

    Your kernel thread is probably sharing filedescriptors with the parent
    process, so although your application closes its copy, because the kernel
    thread hasn't closed its copy, the ->release() method never gets called.

    Make sure you're cleaning up properly when starting the kernel thread. See
    how other kernel threads do it. As Andi says, daemonize() is a good start,
    although it's not always sufficient.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:26    [W:0.021 / U:6.628 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site