Hi, 

Are you trying to run the test app through LDP? If yes, sharing one epoll fd 
between two threads might be the source of the issues, although hard to say 
what could go wrong. 

With respect to your app, could you run it from gdb and check where it’s stuck? 

Regards,
Florin

> On Apr 25, 2022, at 2:16 AM, 25956760...@gmail.com wrote:
> 
> Hi All ,
> 
> I'm trying to use nonblock socket with epoll. 
> I wonder why I sometimes get stuck in socket function when I use VCL .
> Code as following:
>     printf ("before socket\n");
>     if ((c_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
>         perror("create socket fail.\n");
>         exit(0);
>     }
>     printf ("after socket\n");
> The only output is "before socket",socket function even dosen't return.
> Thank you very much
> 
> complete code is in attachments
>  
> <epollandsocket.cpp><output.png>
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21284): https://lists.fd.io/g/vpp-dev/message/21284
Mute This Topic: https://lists.fd.io/mt/90680910/21656
Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to