• Max Kellermann's avatar
    fix race condition in main_notify.c · 3c3620b3
    Max Kellermann authored
    The function wait_main_task() is racy: if the function
    wakeup_via_cond() sees the mutex is locked just before
    wait_main_task() executes pthread_cond_wait(), the main thread blocks
    forever.
    
    Work around this issue by adding a "pending" flag just like in my
    notify.c code.  A standards-compliant solution should be implemented
    later.
    
    git-svn-id: https://svn.musicpd.org/mpd/trunk@7365 09075e82-0dd4-0310-85a5-a0d7c8717e4f
    3c3620b3
main_notify.c 3.42 KB