Skip to content
  • deuce's avatar
    f5bf2ec4
    Finally track down the "two instances of SyncTERM running, one using 100% CPU" · f5bf2ec4
    deuce authored
    problem and kill it once and for all by doing terrible terrible things.
    
    Essentially, the problem stems from SDL installing an atexit() handler and
    cryptlib calling exit() after a fork().  This causes the child to attempt
    to shut down SDL (which isn't running in the child) which apparently spins.
    
    I've "fixed" this by overriding exit()!!!  So any exit() call will not call
    atexit() functions from SyncTERM anymore.
    
    I haven't yet decided if this is a cryptlib bug or an SDL bug, though I'm
    leaning toward SDL.
    f5bf2ec4
    Finally track down the "two instances of SyncTERM running, one using 100% CPU"
    deuce authored
    problem and kill it once and for all by doing terrible terrible things.
    
    Essentially, the problem stems from SDL installing an atexit() handler and
    cryptlib calling exit() after a fork().  This causes the child to attempt
    to shut down SDL (which isn't running in the child) which apparently spins.
    
    I've "fixed" this by overriding exit()!!!  So any exit() call will not call
    atexit() functions from SyncTERM anymore.
    
    I haven't yet decided if this is a cryptlib bug or an SDL bug, though I'm
    leaning toward SDL.
Loading