Page MenuHomeFreeBSD

The socket SO_LINGER option don't work.
Needs ReviewPublic

Authored by on Mon, Feb 22, 6:14 AM.
This revision needs review, but there are no reviewers specified.



Function sodisconnect is run before SO_LINGER option process, so the socket will be closed immediately after data is sent, which will cause another process cannot communicate with current process before the data is received. Because the two process run asynchronous, and client maybe close before server data is received.

Test Plan

use unix socket to communicate between two program.One program run as server, and another as client.
the sent data size of client is very small, and immediately close after calling send .
in the server process, call getpeername function after accept finished.
expect getpeername doesn't return error and error infomation is: "errorno 107 Socket is not connected".

Diff Detail

R10 FreeBSD src repository
Lint Skipped
Unit Tests Skipped

Event Timeline created this revision.