AnsweredAssumed Answered

Kill MQX Task and close it's socket and recv() function

Question asked by Tim Hutchinson on May 15, 2015
Latest reply on May 19, 2015 by Tim Hutchinson

Hi All,


     Does anyone know what would happen if one MQX task killed another MQX task that was listening for incoming socket data with a blocking recv() function call? Would MQX force recv() to return and close the socket properly? What if the task that is killed doesn't have ownership of the socket, will recv() still return and the socket close? Maybe recv() will return but the socket won't close? How about if the task that has ownership of the socket is closed, will that close the socket?


Are these statements true:

     1. Kill an MQX task that owns a socket and the socket is closed? ...Properly?

     2. Kill an MQX task with a blocking call to recv() in progress and MQX will force recv() to return?

     3. Kill a recv() task that doesn't own the socket and recv() will return but the socket will remain open?

     4. If a socket is closed because it's owning task is killed, a blocking call to recv() will return?