Commit 125f62b7 authored by Kazuho Oku's avatar Kazuho Oku

unlink the temporary file immediately after calling mkstemp

parent eb6ba2a7
......@@ -2096,6 +2096,10 @@ int run(char **uris, int n) {
<< std::endl;
return 1;
}
if (unlink(tempfn) != 0) {
std::cerr << "[WARNING] failed to unlink temporary file:" << tempfn
<< std::endl;
}
while (1) {
char buf[1024];
ssize_t rret, wret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment