On 05/15/2014 12:33 PM, Eli Zaretskii wrote:
I think this problem doesn't affect Grep.

OK, thanks for the info. It may affect other GNU applications, though, so I installed the attached documentation patch into Gnulib and will CC: this to bug-gnulib.
>From 1c9b52f3c2d7aebace31ba989fd533ef273265f5 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email protected]>
Date: Thu, 15 May 2014 13:07:50 -0700
Subject: [PATCH] doc: document exec* = spawn+exit bug with non-Cygwin Windows
 platforms

Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/bug-grep/2014-05/msg00118.html
* doc/posix-functions/execl.texi (execl):
* doc/posix-functions/execle.texi (execle):
* doc/posix-functions/execlp.texi (execlp):
* doc/posix-functions/execv.texi (execv):
* doc/posix-functions/execve.texi (execve):
* doc/posix-functions/execvp.texi (execvp):
Mention spawn+exit problem on non-Cygwin Windows platforms.
---
 ChangeLog                       | 13 +++++++++++++
 doc/posix-functions/execl.texi  |  4 ++++
 doc/posix-functions/execle.texi |  4 ++++
 doc/posix-functions/execlp.texi |  4 ++++
 doc/posix-functions/execv.texi  |  4 ++++
 doc/posix-functions/execve.texi |  4 ++++
 doc/posix-functions/execvp.texi |  4 ++++
 7 files changed, 37 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 19dfba5..00126d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2014-05-15  Paul Eggert  <[email protected]>
+
+	doc: document exec* = spawn+exit bug with non-Cygwin Windows platforms
+	Problem reported by Eli Zaretskii in:
+	http://lists.gnu.org/archive/html/bug-grep/2014-05/msg00118.html
+	* doc/posix-functions/execl.texi (execl):
+	* doc/posix-functions/execle.texi (execle):
+	* doc/posix-functions/execlp.texi (execlp):
+	* doc/posix-functions/execv.texi (execv):
+	* doc/posix-functions/execve.texi (execve):
+	* doc/posix-functions/execvp.texi (execvp):
+	Mention spawn+exit problem on non-Cygwin Windows platforms.
+
 2014-05-14  Guilherme de Almeida Suckevicz  <[email protected]>
 
 	getlogin-tests: avoid false failure under sudo/ssh etc.
diff --git a/doc/posix-functions/execl.texi b/doc/posix-functions/execl.texi
index 89c3fa2..68f09a8 100644
--- a/doc/posix-functions/execl.texi
+++ b/doc/posix-functions/execl.texi
@@ -15,4 +15,8 @@ Portability problems not fixed by Gnulib:
 @item
 On some platforms, a script without executable permission is still run:
 Cygwin 1.5.x.
+@item
+On Windows platforms (excluding Cygwin), this function operates by spawning
+and then by exiting the current process, which means the current
+process's parent may incorrectly proceed as if its child had exited.
 @end itemize
diff --git a/doc/posix-functions/execle.texi b/doc/posix-functions/execle.texi
index 1dbc9f3..1966fa1 100644
--- a/doc/posix-functions/execle.texi
+++ b/doc/posix-functions/execle.texi
@@ -15,4 +15,8 @@ Portability problems not fixed by Gnulib:
 @item
 On some platforms, a script without executable permission is still run:
 Cygwin 1.5.x.
+@item
+On Windows platforms (excluding Cygwin), this function operates by spawning
+and then by exiting the current process, which means the current
+process's parent may incorrectly proceed as if its child had exited.
 @end itemize
diff --git a/doc/posix-functions/execlp.texi b/doc/posix-functions/execlp.texi
index ad72214..6a0f954 100644
--- a/doc/posix-functions/execlp.texi
+++ b/doc/posix-functions/execlp.texi
@@ -15,4 +15,8 @@ Portability problems not fixed by Gnulib:
 @item
 On some platforms, a script without executable permission is still run:
 Cygwin 1.5.x.
+@item
+On Windows platforms (excluding Cygwin), this function operates by spawning
+and then by exiting the current process, which means the current
+process's parent may incorrectly proceed as if its child had exited.
 @end itemize
diff --git a/doc/posix-functions/execv.texi b/doc/posix-functions/execv.texi
index e4da0c3..0b10b51 100644
--- a/doc/posix-functions/execv.texi
+++ b/doc/posix-functions/execv.texi
@@ -15,4 +15,8 @@ Portability problems not fixed by Gnulib:
 @item
 On some platforms, a script without executable permission is still run:
 Cygwin 1.5.x.
+@item
+On Windows platforms (excluding Cygwin), this function operates by spawning
+and then by exiting the current process, which means the current
+process's parent may incorrectly proceed as if its child had exited.
 @end itemize
diff --git a/doc/posix-functions/execve.texi b/doc/posix-functions/execve.texi
index 6f99556..03f97eb 100644
--- a/doc/posix-functions/execve.texi
+++ b/doc/posix-functions/execve.texi
@@ -15,4 +15,8 @@ Portability problems not fixed by Gnulib:
 @item
 On some platforms, a script without executable permission is still run:
 Cygwin 1.5.x.
+@item
+On Windows platforms (excluding Cygwin), this function operates by spawning
+and then by exiting the current process, which means the current
+process's parent may incorrectly proceed as if its child had exited.
 @end itemize
diff --git a/doc/posix-functions/execvp.texi b/doc/posix-functions/execvp.texi
index dbd9258..da93271 100644
--- a/doc/posix-functions/execvp.texi
+++ b/doc/posix-functions/execvp.texi
@@ -15,4 +15,8 @@ Portability problems not fixed by Gnulib:
 @item
 On some platforms, a script without executable permission is still run:
 Cygwin 1.5.x.
+@item
+On Windows platforms (excluding Cygwin), this function operates by spawning
+and then by exiting the current process, which means the current
+process's parent may incorrectly proceed as if its child had exited.
 @end itemize
-- 
1.9.0

Reply via email to