2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-04 20:37:49 +00:00
Commit Graph

12 Commits

Author SHA1 Message Date
Alexander Neumann
5d51c8ffcd lock: fix merge error, use processExists() 2015-08-19 21:14:15 +02:00
Alexander Neumann
cd4cc1daec Merge pull request #261 from restic/fix-260
locks: fix testing stale locks created on other hosts
2015-08-18 22:53:52 +02:00
Alexander Neumann
fbe746c261 locks: fix testing stale locks created on other hosts
Closes #260
2015-08-16 16:24:04 +02:00
Klaus Post
35bd8f80c0 Split out process check as separate function.
This will allow the checks to be changed for different operating systems.

Issue #260 is related to this, but this does not change any current behaviour.
2015-08-16 15:30:36 +02:00
Klaus Post
e1f6bbac9f Create uid/gid convertion function.
Create separate function to convert user ID / group ID of a user to integer.
Windows is a stub, since this doesn't work on Windows (uid/gid is not a number).
2015-08-16 13:16:02 +02:00
Klaus Post
3504ea3992 Skip UID/GID and SIGHUP lock-check on Windows
On Windows, User ID/Group ID is not a number, so we ignore any parsing error
that may come from attempting to convert it to an integer. It will simply be '0'.

Don't defer the process Release until we have checked the error.

Skip the SIGHUP connection attempt on Windows. If the process exists, we assume it is running.
2015-08-14 15:13:11 +02:00
Alexander Neumann
5cdcc99eba Use array instead of hash for backend.ID
Since backend.ID is always a slice of constant length, use an array
instead of a slice. Mostly, arrays behave as slices, except that an
array cannot be nil, so use `*backend.ID` insteaf of `backend.ID` in
places where the absence of an ID is possible (e.g. for the Subtree of a
Node, which may not present when the node is a file node).

This change allows to directly use backend.ID as the the key for a map,
so that arbitrary data structures (e.g. a Set implemented as a
map[backend.ID]struct{}) can easily be formed.
2015-07-25 18:01:57 +02:00
Alexander Neumann
159b9e80c4 cmd/restic: implement lock refresh 2015-07-12 22:10:01 +02:00
Alexander Neumann
781ec903e8 lock: add Refresh method 2015-07-12 21:02:00 +02:00
Alexander Neumann
e657287eac cmd/restic: Add command unlock, improve error message 2015-06-28 13:52:23 +02:00
Alexander Neumann
fba912440d Add lock conflict check 2015-06-28 13:52:22 +02:00
Alexander Neumann
d51fd436b5 Add locking functions 2015-06-28 13:52:22 +02:00