bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9076: bug#9098: timeout should use waitpid


From: Paul Eggert
Subject: bug#9076: bug#9098: timeout should use waitpid
Date: Sun, 17 Jul 2011 12:54:19 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11

On 07/17/11 02:44, Jim Meyering wrote:
> would you please add a note to NEWS and
> add a test case to exercise the bug?

Sure, done as follows:

>From fb266dea471f442ecd09813d3e009242135aa1ab Mon Sep 17 00:00:00 2001
From: Paul Eggert <address@hidden>
Date: Sun, 17 Jul 2011 12:47:22 -0700
Subject: [PATCH 1/2] timeout: add regression test (Bug#9098)

* tests/misc/timeout: Check that 'timeout' is not confused when
starting off with a child.
---
 tests/misc/timeout |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tests/misc/timeout b/tests/misc/timeout
index 7506e7c..04465e1 100755
--- a/tests/misc/timeout
+++ b/tests/misc/timeout
@@ -51,4 +51,9 @@ test $? = 124 && fail=1
   exec timeout 10 true
 ) || fail=1
 
+# Don't be confused when starting off with a child (Bug#9098).
+out=$(sleep 1 & exec timeout 2 sh -c 'sleep 3; echo foo')
+status=$?
+test "$out" = "" && test $status = 124 || fail=1
+
 Exit $fail
-- 
1.7.4.4


>From 5cda9009fc68485b1bd04a845e68c103170f6be8 Mon Sep 17 00:00:00 2001
From: Paul Eggert <address@hidden>
Date: Sun, 17 Jul 2011 12:51:56 -0700
Subject: [PATCH 2/2] * NEWS: Mention fix for Bug#9098.

---
 NEWS |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index c382200..61e6e63 100644
--- a/NEWS
+++ b/NEWS
@@ -15,7 +15,8 @@ GNU coreutils NEWS                                    -*- 
outline -*-
   [bug introduced in coreutils-8.8]
 
   timeout now sends signals to commands that create their own process group.
-  [bug introduced in coreutils-7.0]
+  timeout is no longer confused when starting off with a child process.
+  [bugs introduced in coreutils-7.0]
 
 ** Changes in behavior
 
-- 
1.7.4.4






reply via email to

[Prev in Thread] Current Thread [Next in Thread]