Skip to content
  • Peter Wu's avatar
    gspawn: Fix g_spawn deadlock in a multi-threaded program on Linux · 07bd8eb5
    Peter Wu authored and Philip Withnall's avatar Philip Withnall committed
    opendir and closedir are not async-signal-safe, these may call malloc
    under the hood and cause a deadlock in a multi-threaded program.
    This only affected Linux when /proc is mounted, other systems use a
    slower path that iterates through all potential file descriptors.
    Fixes a long-standing problem (since GLib 2.14.2).
    
    Closes #945 and #1014
    07bd8eb5