[argyllcms] Re: Running dispcal stops usb card reader

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Thu, 16 Feb 2012 12:24:02 +1100

Ridouan Agarad wrote:
> Having said that and also that I do not the specifics of the VDR/softcam 
> application, /proc has a
> list of open filehandles per process (/proc/<pid>/fd/<id>), where <id>  is a 
> symlink to the
> underlying device node (usually /dev/*). Knowing that and knowing you're 
> about to open /dev/ttyXYZ,
> you could check if there's any process having an open handle to that same 
> device node. If so, don't
> bother and continue....

Hi,

Do they create a lock file in /var/lock/LCK..tty<XX> ?

> Well, looking a bit closer at the documentation, I don't have argyllcms 
> running (on Linux) and
> can't check, I guess using the '-c' parameter for e.g. dispcal would already 
> allow one to achieve
> this, wouldn't it?

No, because the -c list is populated by looking for all the serial ports,
which is what is causing the problem we are discussing... :-)

> Isn't /proc/devices maybe usable as an 'automatic' filter (if the file is 
> available, that is) to
> filter out devices for which no driver is currently loaded (and thus not 
> usable anyway)?

I looking into that, but /proc/devices only lists the drivers, so it will
match all ports handled by that driver, whether they are real or not.

Looking at /dev again on more recent Linux systems, perhaps
there really isn't a problem with listing all the ports that match
(ie. I see only 4 on my system, one of which is real).

Graeme Gill.

Other related posts: