Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dmitry Baryshkov
nettle
Commits
1dc3733b
Commit
1dc3733b
authored
Oct 30, 2008
by
Niels Möller
Browse files
(main): Fixed file locking.
Rev: nettle/tools/sexp-conv.c:1.3
parent
3880cae6
Changes
1
Show whitespace changes
Inline
Side-by-side
tools/sexp-conv.c
View file @
1dc3733b
...
@@ -380,8 +380,13 @@ main(int argc, char **argv)
...
@@ -380,8 +380,13 @@ main(int argc, char **argv)
struct
flock
fl
;
struct
flock
fl
;
memset
(
&
fl
,
0
,
sizeof
(
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
)
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 */
#endif
/* HAVE_FCNTL_LOCKING */
if
(
options
.
hash
)
if
(
options
.
hash
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment