Skip to content
Snippets Groups Projects
Commit 1dc3733b authored by Niels Möller's avatar Niels Möller
Browse files

(main): Fixed file locking.

Rev: nettle/tools/sexp-conv.c:1.3
parent 3880cae6
No related branches found
No related tags found
No related merge requests found
......@@ -380,8 +380,13 @@ main(int argc, char **argv)
struct flock fl;
memset(&fl, 0, sizeof(fl));
fl.l_type = F_WRLCK;
fl.l_whence = SEEK_SET;
fl.l_start = 0;
fl.l_len = 0; /* Means entire file. */
if (fcntl(STDOUT_FILENO, F_SETLKW, &fl) == -1)
die("Locking output file failed: $s\n", strerror(errno));
die("Locking output file failed: %s\n", strerror(errno));
}
#endif /* HAVE_FCNTL_LOCKING */
if (options.hash)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment