Further investigation in the internals of select() showed me I initially
misunderstood how FD_SET worked.

This restriction was to ensure the number of the FDs themselves do not go
over 1023, because if an accept()ed connection receives such a number, it
will be impossible to insert it in a FD_SET and to manage it via select().

The only proper way to avoid this bug would be to prevent accepting of
connections after 900 or 1000.
Alternatively, rejecting connections outside of select() when the FD number
is above FD_SETSIZE.

Neither are desirable solutions, but the alternative is to stop using
select(), which means a significant rewrite of Sendmail.
-- 
ラピー ステファン Lapie Stephane
株式会社朝日ネット システム部

Reply via email to