aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii2016-01-12 18:41:58 +0200
committerEli Zaretskii2016-01-12 18:41:58 +0200
commit58a622d473112f8ff5b4bdb3e49bc6573dfd3404 (patch)
tree58b618f654cae22d1e5f102cbb48bec56e833d45 /doc
parent1f6898d0510cd15455f665c0f38451755a374243 (diff)
downloademacs-58a622d473112f8ff5b4bdb3e49bc6573dfd3404.tar.gz
emacs-58a622d473112f8ff5b4bdb3e49bc6573dfd3404.zip
Make piping to subprocesses more robust on MS-Windows
* 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'.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/msdos.texi14
1 files changed, 12 insertions, 2 deletions
diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi
index ea8a24d1cf7..6ad12d646a1 100644
--- a/doc/emacs/msdos.texi
+++ b/doc/emacs/msdos.texi
@@ -655,7 +655,7 @@ and the right button generates @kbd{mouse-3} events. If this variable
655is non-@code{nil}, the roles of these two buttons are reversed. 655is non-@code{nil}, the roles of these two buttons are reversed.
656 656
657@node Windows Processes 657@node Windows Processes
658@section Subprocesses on Windows 9X/ME and Windows NT/2K/XP 658@section Subprocesses on Windows 9X/ME and Windows NT/2K/XP/Vista/7/8/10
659@cindex subprocesses on MS-Windows 659@cindex subprocesses on MS-Windows
660 660
661@cindex DOS applications, running from Emacs 661@cindex DOS applications, running from Emacs
@@ -663,7 +663,8 @@ is non-@code{nil}, the roles of these two buttons are reversed.
663version) includes full support for asynchronous subprocesses. 663version) includes full support for asynchronous subprocesses.
664In the Windows version, synchronous and asynchronous subprocesses work 664In the Windows version, synchronous and asynchronous subprocesses work
665fine on both 665fine on both
666Windows 9X/ME and Windows NT/2K/XP as long as you run only 32-bit Windows 666Windows 9X/ME and Windows NT/2K/XP/Vista/7/8/10 as long as you run
667only 32-bit or 64-bit Windows
667applications. However, when you run a DOS application in a subprocess, 668applications. However, when you run a DOS application in a subprocess,
668you may encounter problems or be unable to run the application at all; 669you may encounter problems or be unable to run the application at all;
669and if you run two DOS applications at the same time in two 670and if you run two DOS applications at the same time in two
@@ -713,6 +714,15 @@ character. If the value is a character, Emacs uses that character to escape
713any quote characters that appear; otherwise it chooses a suitable escape 714any quote characters that appear; otherwise it chooses a suitable escape
714character based on the type of the program. 715character based on the type of the program.
715 716
717@vindex w32-pipe-buffer-size
718 The variable @code{w32-pipe-buffer-size} controls the size of the
719buffer Emacs requests from the system when it creates pipes for
720communications with subprocesses. The default value is zero, which
721lets the OS choose the size. Any valid positive value will request a
722buffer of that size in bytes. This can be used to tailor
723communications with subprocesses to programs that exhibit unusual
724behavior with respect to buffering pipe I/O.
725
716@ifnottex 726@ifnottex
717@findex w32-shell-execute 727@findex w32-shell-execute
718 The function @code{w32-shell-execute} can be useful for writing 728 The function @code{w32-shell-execute} can be useful for writing