accept02: Add SAFE_FORK to clean CLOSE_WAIT fds
Hi Cyril,
Thanks for your review! Yes, I cann't the clone_server_sockfd is not closed before,
and I will resubmit a patch, please see: https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
Best regards,
Gongyi
Quoted 25 lines
Hi!
As far as I can tell we should rather close the fd returned from theaccept()call like this:testcases/kernel/syscalls/accept/accept02.c +2
-0@@ -68,6 +68,8 @@ static void *server_thread(void *arg)TEST (setsockopt (clone_server_sockfd,SOL_IP ,MCAST_LEAVE_GROUP , mc_group, mc_group_len)); +SAFE_CLOSE (clone_server_sockfd); +if (TST_RET !=-1 )tst_res (TFAIL ,"Multicast group was copied!" );else if (TST_ERR == EADDRNOTAVAIL)--
Cyril Hrubis
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp