mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-07 13:20:25 +00:00
Check if a temporary file was successfully closed
This commit is contained in:
parent
12144de8ed
commit
369ea7e177
@ -182,8 +182,10 @@ static void gdb_info(pid_t pid)
|
|||||||
/* Error creating temp file */
|
/* Error creating temp file */
|
||||||
if(fd >= 0)
|
if(fd >= 0)
|
||||||
{
|
{
|
||||||
close(fd);
|
if (close(fd) == 0)
|
||||||
remove(respfile);
|
remove(respfile);
|
||||||
|
else
|
||||||
|
std::cerr << "Warning: can not close and remove file '" << respfile << "': " << std::strerror(errno) << std::endl;
|
||||||
}
|
}
|
||||||
printf("!!! Could not create gdb command file\n");
|
printf("!!! Could not create gdb command file\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user