Skip to content

Commits on Source 2

  • Aleksy Barcz's avatar
    Removed signal handlers from draw3 · 2275b41d
    Aleksy Barcz authored
    + caused deadlocks on program exit, as functions called from signal handler were not async-signal-safe (see: man signal-safety). Amongst others, malloc and pthread_join are not safe.
    + OS will cleanup our threads and db queue anyway
    + saving defined user params on exit is no longer necessary as we save them on every edit action
    + because of all the above, we can safely leave signal handling and cleanup to standard OS behavior on Linux
    2275b41d
  • Aleksy Barcz's avatar
    libparnt: lock everything · 9ce9aa92
    Aleksy Barcz authored
    + there is a lock introduced in "Add global parser synchronous access mutex", but still draw3 segfaults on init
    + segfaults are not reproducible using valgrind, and happen in AddPar, where curr points to a badly initialized structure
    + altogether this looks very much like a multithreading issue
    + so introduce a recursive_lock, locking every single function in libparnt
    + this is extremely ugly, but it works and it doesn't slow down program start remarkably
    + a proper fix would be removing all the libparnt code and writing a new, simple, parser for szarp.cfg
    9ce9aa92
Loading