I’m curious how software can be created and evolve over time. I’m afraid that at some point, we’ll realize there are issues with the software we’re using that can only be remedied by massive changes or a complete rewrite.

Are there any instances of this happening? Where something is designed with a flaw that doesn’t get realized until much later, necessitating scrapping the whole thing and starting from scratch?

  • uis@lemm.ee
    link
    fedilink
    arrow-up
    1
    ·
    9 months ago

    errno is not shared between threads. Also:

    signal handlers that call functions that may set errno or modify the floating-point environment must save their original values, and restore them before returning.

    There does not add more race conditions because signal handlers execute in one of regular threads. In single-threaded program signals are functions that can be called by OS at any point of execution, but they do not execute at same time with threads.