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.
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.
Fixed in [e2c62c]. Based on enclosed patch + configuring the variable in configure.ac.
Please close if fix is OK
Related
Commit: [e2c62c]
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.
OK, closing.