Menu

#44 Lockfiles for e,g, /dev/tty???? not compatible with Fedora (and probably others)

1.0
closed
nobody
serial (3)
fixed,
2014-11-18
2014-09-07
No

At least in Fedora 20, the correct location for lockfiles (signaling that a device like /dev/tty* is use) appears to have been moved from the previous location /var/lock (which a symlink to /var/run/lock) to /var/lock/lockdev. The first one is only writeable for root, while the second is writeable for group lock. (Even "worse", when chmod/chgrp-ing /var/lock, some daemon resets it somewhat later...) Other programs, like the Fedora version of RXTX, uses /var/lock/lockdev. Not agreeing on the location of lock files defeats its purpose...

I am not sure about the "one true solution": possibly configure should determine a LOCKDIR, possibly it should be an environment variable, or possibly /var/lock/lockdev is THE ANSWER.

The enclosed fix to serial.c fixes the problem for Fedora at least.

1 Attachments

Discussion

  • Alec Leamas

    Alec Leamas - 2014-09-07

    Hm... you found it! Award!

    Seems that debian (and thus ubuntu) sticks to /var/lock. Thus, this needs to be configured, probably with a default value depending on if /var/lock/lockdev exists or not. Perhaps some lines in configure.ac, perhaps just a hardcoded default in lib/lirc_config.h.

     
  • Alec Leamas

    Alec Leamas - 2014-09-09

    Fixed in [e2c62c]. Based on enclosed patch + configuring the variable in configure.ac.

    Please close if fix is OK

     

    Related

    Commit: [e2c62c]

  • Bengt Martensson

    Looks OK to me. There has definitely been other locking conventions around (see e.g. comments in rxtx, file lockdaemon.c), but trying to catch everything is hardly worth it.

     
  • Alec Leamas

    Alec Leamas - 2014-09-09

    OK, closing.

     
  • Alec Leamas

    Alec Leamas - 2014-09-09
    • status: open --> closed
     
  • Alec Leamas

    Alec Leamas - 2014-11-18
    • Resolution: --> fixed,
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.