Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
72b7e559
Commit
72b7e559
authored
Oct 08, 2006
by
gni/root@dev3-127.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG #21858 Make sure retry when EINTR returns, which decreases memory leak chance.
parent
b52d86cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
ndb/src/common/util/File.cpp
ndb/src/common/util/File.cpp
+15
-3
No files found.
ndb/src/common/util/File.cpp
View file @
72b7e559
...
@@ -123,13 +123,25 @@ bool
...
@@ -123,13 +123,25 @@ bool
File_class
::
close
()
File_class
::
close
()
{
{
bool
rc
=
true
;
bool
rc
=
true
;
int
retval
=
0
;
if
(
m_file
!=
NULL
)
if
(
m_file
!=
NULL
)
{
{
::
fflush
(
m_file
);
::
fflush
(
m_file
);
rc
=
(
::
fclose
(
m_file
)
==
0
?
true
:
false
);
retval
=
::
fclose
(
m_file
);
m_file
=
NULL
;
// Try again?
while
(
(
retval
!=
0
)
&&
(
errno
==
EINTR
)
){
retval
=
::
fclose
(
m_file
);
}
if
(
retval
==
0
){
rc
=
true
;
}
else
{
rc
=
false
;
ndbout_c
(
"ERROR: Close file error in File.cpp for %s"
,
strerror
(
errno
));
}
}
}
m_file
=
NULL
;
return
rc
;
return
rc
;
}
}
...
...
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