Clean the MSG_NOSIGNAL handling #5364

issue paveljanik opened this issue on November 25, 2014
  1. paveljanik commented at 7:10 AM on November 25, 2014: contributor

    Handling of MSG_NOSIGNAL is spread over several source files.

    It should be handled in compat.h (defined if not defined on the system) and then used in src/net.cpp, src/netbase.cpp. Right now, the ifdef code is in all files.

    Low prio, I'll take care about this issue.

  2. laanwj commented at 9:43 AM on November 27, 2014: member

    I'm OK with this being cleaned up, but why is this an issue? It isn't broken due to this.

  3. paveljanik commented at 9:50 AM on November 27, 2014: contributor

    @laanwj well, it was the (indirect) cause of other bug we have solved this week. Thus I filled it to fix it later. BTW - how do I assign the bug, how do I add Priority Low label? I do not think the interface allows me to do it.

  4. laanwj added the label Priority Low on Nov 27, 2014
  5. laanwj commented at 11:01 AM on November 27, 2014: member

    It's not really meant as a personal TODO list. Although I've been guilty of that too at times. I've added your low priority label.

  6. paveljanik commented at 1:50 PM on November 28, 2014: contributor

    My first idea was to remove the testing from configure completely and use simple

    #ifndef MSG_NOSIGNAL
    #define MSG_NOSIGNAL 0
    #endif
    

    in compat.h (and only there) but we can't use it, because on some systems, MSG_NOSIGNAL can be enum, global constant or whatever... Some projects use this simple tests, but it can only bring problems.

  7. paveljanik commented at 10:38 PM on November 28, 2014: contributor

    Boost is using completely different approach:

    #if defined(__linux__)
      flags |= MSG_NOSIGNAL;
    #endif // defined(__linux__)
    
  8. paveljanik commented at 8:06 PM on May 23, 2015: contributor

    It is not worth the effort. Closing.

  9. paveljanik closed this on May 23, 2015

  10. MarcoFalke locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-28 00:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me