• Eli Zaretskii's avatar
    Make piping to subprocesses more robust on MS-Windows · 58a622d4
    Eli Zaretskii authored
    * src/w32.c (sys_write): Don't write to a pipe more stuff than its
    buffer can hold.  Don't return -1 if something has been written to
    the pipe.  Zero out 'errno' before calling '_write', to avoid
    returning a stale value.  (Bug#22344)
    * src/w32proc.c (syms_of_ntproc) <w32-pipe-buffer-size>: New variable.
    * src/w32.c (pipe2): Use it to request a user-defined size for the
    pipe being created.
    
    * etc/NEWS: Mention 'w32-pipe-buffer-size'.
    
    * doc/emacs/msdos.texi (Windows Processes): Document
    'w32-pipe-buffer-size'.
    58a622d4
w32proc.c 111 KB