• Martin Lucina's avatar
    Automatically resize signalling socket buffer if full · 1b39bcd8
    Martin Lucina authored
    If the socketpair used by signaler_t fills up, this can lead to deadlock.
    This patch provides partial resolution by attempting to resize SO_SNDBUF on
    the writer side, and if that fails we shall at least assert rather than
    hang.
    
    I've also refactored the signaler_t code to make the platform-dependent
    parts clearer and have tested both the MSG_DONTWAIT and standard POSIX path
    in recv.
    
    The Win32 implementation currently does not implement resizing as I'm not
    convinced that it's safe, but it will also assert like other platforms if
    signaler_t::send() cannot succeed.
    
    The OpenVMS implementation has been carried forward but is untested.
    Signed-off-by: 's avatarMartin Lucina <mato@kotelna.sk>
    1b39bcd8
config.hpp 3.52 KB