From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2] xenconsole: Allow non-interactive use Date: Fri, 24 Jul 2015 14:13:41 +0100 Message-ID: <1437743621.24746.89.camel@citrix.com> References: <1437664991.24746.10.camel@citrix.com> <1437737448-10733-1-git-send-email-martin@lucina.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZIcnL-0004gT-LC for xen-devel@lists.xenproject.org; Fri, 24 Jul 2015 13:13:47 +0000 In-Reply-To: <1437737448-10733-1-git-send-email-martin@lucina.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Martin Lucina , xen-devel@lists.xenproject.org Cc: Wei Liu , Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, 2015-07-24 at 13:30 +0200, Martin Lucina wrote: > If xenconsole is run with stdin closed or redirected to /dev/null, > console_loop() will return immediately due to failure to read from > STDIN_FILENO. This patch tests if stdin and stdout are both connected > to > a TTY and, if not, xenconsole will not attempt to read from stdin or > modify stdout terminal attributes. > > Existing behaviour when xenconsole is run from a terminal does not > change. > > This allows for non-interactive use, eg. running "xl create -c" under > systemd or piping the output of "xl console" to another command. > > Signed-off-by: Martin Lucina > Cc: Ian Jackson > Cc: Stefano Stabellini > Cc: Ian Campbell > Cc: Wei Liu Acked + applied, thanks.