[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [OSSTEST PATCH 05/11] mg-debug-fail: Catch attempts to read from a tty
On Fri, 2015-12-04 at 19:35 +0000, Ian Jackson wrote: > When stdin is a tty, do not try to dump it. > > Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> > --- > Âmg-debug-fail |ÂÂÂÂ8 ++++---- > Â1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/mg-debug-fail b/mg-debug-fail > index 64fa235..ffe9f50 100755 > --- a/mg-debug-fail > +++ b/mg-debug-fail > @@ -3,10 +3,10 @@ > Â# This script can be provided anywhere an executable or command name is > Â# wanted.ÂÂIt prints its arguments, and its stdin, to its stderr, and > Â# then exits nonzero. > -# > -# When using this it may be useful to provide </dev/null as a > -# redirection for the whole program under test.ÂÂOtherwise things > -# can mysteriously hang. > + > +if tty >/dev/null 2>&1; then > + exec </dev/null > +fi > Â > Âbash -xc ': mg-debug-fail "$@"' x "$@" > Âegrep . >&2 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |