n2n
n2n copied to clipboard
2.9 windows version ,parent process send SIGINT to child edge process not work,but it works on linux
2.9 windows version ,parent process send SIGINT to child edge process not work,but it works on linux, linux can receive the message : ok, I am leaving now
but windows can not
Windows has always been weak.
@lucktu @Logan007 you can tell me which function should be called when ctrl+c on windows,I will do it
@Logan007
I have observed the extra thread (Windows only!) not immediately reacting, i.e. it took some seconds to terminate the edge after CTRL + C, but so far, I have never went deeper into it.
I guess we need to investigate the tun_read_thread
in more detail.
but it works on linux
There is no need for a chhild process / thread in Linux as TAP handling works differently.
I think you can call send_unregister_super first when ctrl+c
I think you can call send_unregister_super first when ctrl+c
:+1: Will change it.
This however probably does not solve the blocking WaitForSingleObject
. I went a bit into it suspecting the IO to be blocking, but realized thatwin32/wintap.c
opens it with FILE_FLAG_OVERLAPPED
... so, I am a bit puzzled here.
I found that it may be blocked in while loop
i have pulled request,please check it ,you can make the code better
Thank you, I will have a look.