Skip to content
  • Georgi Kodinov's avatar
    57acdd12
    Bug #12969156: SEGMENTATION FAULT ON UNINSTALLING · 57acdd12
    Georgi Kodinov authored
    DAEMON_EXAMPLE PLUGIN
    
    The deinit() function of the daemon example plugin was 
    calling pthread_cancel, but not waiting for the worker 
    thread to actually complete before deallocating the data
    buffer and closing the file that it writes to.
    Fixed by adding a pthread_join to wait for the thread 
    to complete before doing the cleanup work that may 
    affect it.
    Test case added.
    Removed a stray 'x' variable from the example code.
    57acdd12
    Bug #12969156: SEGMENTATION FAULT ON UNINSTALLING
    Georgi Kodinov authored
    DAEMON_EXAMPLE PLUGIN
    
    The deinit() function of the daemon example plugin was 
    calling pthread_cancel, but not waiting for the worker 
    thread to actually complete before deallocating the data
    buffer and closing the file that it writes to.
    Fixed by adding a pthread_join to wait for the thread 
    to complete before doing the cleanup work that may 
    affect it.
    Test case added.
    Removed a stray 'x' variable from the example code.
Loading