[LTP] [PATCH v2] openposix/fork/11-1.c: Clean up temporary file
Zhao Gongyi
zhaogongyi@huawei.com
Sat Feb 20 06:09:48 CET 2021
We need to clean up temporary file /tmp/fork-11-1-XXXXXX which created by mkstemp.
Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---
(v2->v1: Call unlink behind of close(fd) that makes logic more clear then before fork.)
.../open_posix_testsuite/conformance/interfaces/fork/11-1.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
index a43bc274c..8a7796cfd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
@@ -106,5 +106,6 @@ int main(void)
cleanup:
close(fd);
+ unlink(path_template);
return result;
}
--
2.17.1
More information about the ltp
mailing list