diff mbox series

[v2] openposix/fork/11-1.c: Clean up temporary file

Message ID 20210220050948.142027-1-zhaogongyi@huawei.com
State Accepted
Headers show
Series [v2] openposix/fork/11-1.c: Clean up temporary file | expand

Commit Message

Zhao Gongyi Feb. 20, 2021, 5:09 a.m. UTC
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(+)

--
2.17.1

Comments

Li Wang Feb. 20, 2021, 6:59 a.m. UTC | #1
Hi Gongyi,

Thanks for your work, patch applied.
I'll send a separate patch for the test report issue.
diff mbox series

Patch

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;
 }