Find the answer to your Linux question:
Results 1 to 3 of 3
Hai Im trying to open a file which is a character special type, which is also relates to a device file stored in /dev. When i try to open the ...
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Posts
    19

    Debug device or resource is busy, errno msg

    Hai

    Im trying to open a file which is a character special type, which is also relates to a device file stored in /dev. When i try to open the file using function open(), the errno msg reply as "Device or Resource busy". how can I debug this, meaning how can I see what application or other resource that is using that device and I want to disable it as well, to make the device only talk with my application. Previously I have change the group and owner to the dev file as root root but still this problem still exist. Can anyone help?

  2. #2
    Just Joined!
    Join Date
    Feb 2009
    Posts
    45
    Answer:

    Quote Originally Posted by omronz
    Im trying to open a file which is a character special type, which is also relates to a device file stored in /dev. When i try to open the file using function open(), the errno msg reply as "Device or Resource busy". […] how can I see what application or other resource that is using that device […]
    You might be looking for the program «lsof»¹, because
    Code:
    $> man lsof
    […]
    NAME
           lsof - list open files
    […]
    DESCRIPTION
           Lsof revision 4.81 lists on its standard output file information about files opened by processes for the following UNIX dialects:
    […]
           An open file may be a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream or a network file (Internet
           socket, NFS file or UNIX domain socket.)  A specific file or all the files in a file system may be selected by path.
    […]
    Footnotes:

  3. #3
    Just Joined!
    Join Date
    Dec 2007
    Posts
    19
    Yes, that solves my problem. Thanks a lot. Really appreciate it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...