Changeset View
Changeset View
Standalone View
Standalone View
src/test/util_tests.cpp
Show First 20 Lines • Show All 1,208 Lines • ▼ Show 20 Lines | while (true) { | ||||
ch = LockDirectory(dirname, lockname); | ch = LockDirectory(dirname, lockname); | ||||
rv = write(fd, &ch, 1); | rv = write(fd, &ch, 1); | ||||
assert(rv == 1); | assert(rv == 1); | ||||
break; | break; | ||||
case UnlockCommand: | case UnlockCommand: | ||||
ReleaseDirectoryLocks(); | ReleaseDirectoryLocks(); | ||||
ch = true; // Always succeeds | ch = true; // Always succeeds | ||||
rv = write(fd, &ch, 1); | rv = write(fd, &ch, 1); | ||||
assert(rv == 1); | |||||
break; | break; | ||||
case ExitCommand: | case ExitCommand: | ||||
close(fd); | close(fd); | ||||
exit(0); | exit(0); | ||||
default: | default: | ||||
assert(0); | assert(0); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |