Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Oleksii Turkot
CrystFEL
Commits
2ad67196
Commit
2ad67196
authored
Jul 03, 2012
by
Thomas White
Browse files
Locking fussiness
parent
f36ea6e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/indexamajig.c
View file @
2ad67196
...
...
@@ -283,7 +283,7 @@ static void process_image(const struct index_args *iargs,
char
*
outfilename
=
iargs
->
outfile
;
int
fd
;
FILE
*
fh
;
struct
flock
fl
=
{
F_WRLCK
,
SEEK_SET
,
0
,
0
,
0
}
;
struct
flock
fl
;
image
.
features
=
NULL
;
image
.
data
=
NULL
;
...
...
@@ -409,7 +409,10 @@ static void process_image(const struct index_args *iargs,
}
/* Write Lock */
fl
.
l_pid
=
getpid
();
fl
.
l_type
=
F_WRLCK
;
fl
.
l_whence
=
SEEK_SET
;
fl
.
l_start
=
0
;
fl
.
l_len
=
0
;
/* Means "lock the whole file" */
fd
=
open
(
outfile
,
O_WRONLY
);
if
(
fd
==
-
1
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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