• Paul Eggert's avatar
    Dissociate controlling tty better on Darwin · 9cd23a29
    Paul Eggert authored
    * src/process.c (dissociate_controlling_tty): New function.
    (create_process): Use it to dissociate controlling tty if setsid
    fails, which happens on Darwin after a vfork (Bug#33154).
    Do this on all platforms, not just on Darwin, as a similar
    problem is plausible elsewhere.
    * src/callproc.c (call_process): Use the new function here, too,
    for consistency and to avoid duplicate code.
    9cd23a29
process.c 241 KB