[LTP] [PATCH] openposix/fork/11-1.c: Clean up temporary file
Li Wang
liwang@redhat.com
Fri Feb 19 14:38:31 CET 2021
On Fri, Feb 19, 2021 at 5:34 PM zhaogongyi <zhaogongyi@huawei.com> wrote:
> Hi Li,
>
>
>
> I think we need to delete the tempfile after the testing(in the cleanup
> phase).
>
>
>
> In this case, we just hope that call unlink after open/mkstemp since
> unlink would not destroy the inode,
>
>
>
> so call unlink before fork would not affect the test?
>
Right, but better to put behind of close(fd) that makes logic more clear.
>
> BTW, seems the child report a wrong status of the locked file, while
>
> fcntl(fd, F_SETLK, &fl) return -1 and sets errno to EACCES or EAGAIN,
>
> shouldn't that mean the file already been locked by the parent?
>
And what do u think about this?
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210219/044cfd15/attachment.htm>
More information about the ltp
mailing list