diff options
| author | Eli Zaretskii | 2016-01-12 18:41:58 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-01-12 18:41:58 +0200 |
| commit | 58a622d473112f8ff5b4bdb3e49bc6573dfd3404 (patch) | |
| tree | 58b618f654cae22d1e5f102cbb48bec56e833d45 /doc | |
| parent | 1f6898d0510cd15455f665c0f38451755a374243 (diff) | |
| download | emacs-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.texi | 14 |
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 | |||
| 655 | is non-@code{nil}, the roles of these two buttons are reversed. | 655 | is 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. | |||
| 663 | version) includes full support for asynchronous subprocesses. | 663 | version) includes full support for asynchronous subprocesses. |
| 664 | In the Windows version, synchronous and asynchronous subprocesses work | 664 | In the Windows version, synchronous and asynchronous subprocesses work |
| 665 | fine on both | 665 | fine on both |
| 666 | Windows 9X/ME and Windows NT/2K/XP as long as you run only 32-bit Windows | 666 | Windows 9X/ME and Windows NT/2K/XP/Vista/7/8/10 as long as you run |
| 667 | only 32-bit or 64-bit Windows | ||
| 667 | applications. However, when you run a DOS application in a subprocess, | 668 | applications. However, when you run a DOS application in a subprocess, |
| 668 | you may encounter problems or be unable to run the application at all; | 669 | you may encounter problems or be unable to run the application at all; |
| 669 | and if you run two DOS applications at the same time in two | 670 | and 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 | |||
| 713 | any quote characters that appear; otherwise it chooses a suitable escape | 714 | any quote characters that appear; otherwise it chooses a suitable escape |
| 714 | character based on the type of the program. | 715 | character 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 | ||
| 719 | buffer Emacs requests from the system when it creates pipes for | ||
| 720 | communications with subprocesses. The default value is zero, which | ||
| 721 | lets the OS choose the size. Any valid positive value will request a | ||
| 722 | buffer of that size in bytes. This can be used to tailor | ||
| 723 | communications with subprocesses to programs that exhibit unusual | ||
| 724 | behavior 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 |