Check for lock file in non-writable directories


On some linux systems /var/lock is not writable by users which are not
root and not in the uucp or dialout group.
If the root user acquires a lock and you are trying to access the same
port with a non-root user it will not check for the lock but creates a
new lock file in /tmp instead.
This change checks in readable directories for lock files.

Change-Id: Ia308fd344d2fe9d3c699f7a428ff620ea101eff3
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
commit7a6da7878566dc18acb540bd29f7e11fa7e3ff66
parent3bb682ea29ffaf72ff73e6eb57abdc5c59524e8a
authorRainer Keller <rainer.keller@digia.com>
committerRainer Keller <rainer.keller@digia.com>
commit timeThu, 23 Oct 2014 10:35:19 +0200