• Paul Eggert's avatar
    Fix process leak with make-network-process · 2dd8044b
    Paul Eggert authored
    This problem was introduced by the recent async changes (Bug#23808).
    * src/process.c (Fmake_process): Move USE_SAFE_ALLOCA later,
    so that it follows the start_process_unwind unwind-protect.
    Set pid to -1 while the process is being created.
    (start_process_unwind): Omit unnecessary emacs_abort test.
    (connect_network_socket): Simplify use of counts.  Unwind
    bind_polling_period a bit earlier, so that a remove_process
    unwind-protect can be added when needed; this is the heart of
    the fix.  Undo the unwind-protect just before returning.
    2dd8044b
process.h 9.01 KB