Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

Blocking close with SO_LINGER
 
________________________________________________________________________

Applicable Environment
________________________________________________________________________
  • Topic: Blocking close with SO_LINGER
  • SDP: 6.5.0
  • Target: Any supported target
________________________________________________________________________

Recommendation
________________________________________________________________________

Found the problem - our stack uses a 0 value for the timeout as nothing has been set at the accept() call, and uses the default. You need to set the socket options on the server side AFTER the accept() call, and then it works as expected. The reason that it worked with a timeout of 1, though, is that it is inherited as we overload the 0 value (as it were).

You can also see this behaviour if you getsockopts() after the accept() (l_linger will be 120).

________________________________________________________________________
NOTE: This entry has been validated against the SDP version listed above. Use caution when considering this advice for any other SDP version. For supported releases, please reach out to QNX Technical Support if you have any questions/concerns.
________________________________________________________________________


Related Attachments
 None Found





Please contact us with your questions or concerns.