mirror of
https://github.com/zdharma-continuum/zconvey.git
synced 2026-09-10 07:06:21 -04:00
myflock: restore locking via file descriptor
This commit is contained in:
parent
961c1b57f0
commit
8f3d675872
|
|
@ -210,6 +210,9 @@ int main(int argc, char *argv[])
|
|||
filename = argv[optind];
|
||||
fd = open_file(filename, &open_flags);
|
||||
|
||||
} else if (optind < argc) {
|
||||
/* Use provided file descriptor */
|
||||
fd = atoi(argv[optind]);
|
||||
} else {
|
||||
/* Bad options */
|
||||
errx(EX_USAGE, _("requires file descriptor, file or directory"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue