Richard W.M. Jones
2014-Jan-28 16:21 UTC
[Libguestfs] [PATCH] run: Actually use timeout --foreground option (RHBZ#1025269).
The following commit managed to not actually add the --foreground option to the timeout command, just test for it. Add it this time. commit 681488877456b83f039dc518861f29ab4e1857f0 Author: Richard W.M. Jones <rjones@redhat.com> Date: Thu Dec 19 08:21:53 2013 +0000 run: Use timeout --foreground option. If timeout doesn't have this option (RHEL 6) don't use timeout at all. Attempt to fix RHBZ#1025269. --- run.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.in b/run.in index d4b13fe..93c50d2 100755 --- a/run.in +++ b/run.in @@ -231,7 +231,7 @@ if timeout --help >/dev/null 2>&1; then if timeout --foreground 2 sleep 0 >/dev/null 2>&1; then # Does this version of timeout have the -k option? (Not on RHEL 6) if timeout -k 10s 10s true >/dev/null 2>&1; then - timeout="timeout -k $timeout_kill $timeout_period" + timeout="timeout --foreground -k $timeout_kill $timeout_period" fi fi fi -- 1.8.4.2
Pino Toscano
2014-Jan-28 16:32 UTC
Re: [Libguestfs] [PATCH] run: Actually use timeout --foreground option (RHBZ#1025269).
On Tuesday 28 January 2014 16:21:38 Richard W.M. Jones wrote:> The following commit managed to not actually add the --foreground > option to the timeout command, just test for it. Add it this time. > > commit 681488877456b83f039dc518861f29ab4e1857f0 > Author: Richard W.M. Jones <rjones@redhat.com> > Date: Thu Dec 19 08:21:53 2013 +0000 > > run: Use timeout --foreground option. > > If timeout doesn't have this option (RHEL 6) don't use timeout at > all. > > Attempt to fix RHBZ#1025269. > --- > run.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/run.in b/run.in > index d4b13fe..93c50d2 100755 > --- a/run.in > +++ b/run.in > @@ -231,7 +231,7 @@ if timeout --help >/dev/null 2>&1; then > if timeout --foreground 2 sleep 0 >/dev/null 2>&1; then > # Does this version of timeout have the -k option? (Not on > RHEL 6) if timeout -k 10s 10s true >/dev/null 2>&1; then > - timeout="timeout -k $timeout_kill $timeout_period" > + timeout="timeout --foreground -k $timeout_kill > $timeout_period" fi > fi > fiAh! I've wondered why it would require a version of timeout with that specific feature, without actually making use of it... just forgot to ask when I noticed that few days ago. :) -- Pino Toscano
Reasonably Related Threads
- [PATCH] Remove multiple hacks that only apply to RHEL 5.
- [PATCH] The autotest timeout is now a command line configurable option.
- [PATCH node] Update autobuild and autotest scripts for new build structure
- [PATCH v2 0/3] tests: Introduce test harness for running tests.
- [PATCH v3] tests: Introduce test harness for running tests.