Return-Path: X-Original-To: apmail-karaf-issues-archive@minotaur.apache.org Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B09289001 for ; Sat, 25 Feb 2012 07:34:12 +0000 (UTC) Received: (qmail 52905 invoked by uid 500); 25 Feb 2012 07:34:12 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 52797 invoked by uid 500); 25 Feb 2012 07:34:11 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 52711 invoked by uid 99); 25 Feb 2012 07:34:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Feb 2012 07:34:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Feb 2012 07:34:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CE2833390E5 for ; Sat, 25 Feb 2012 07:33:46 +0000 (UTC) Date: Sat, 25 Feb 2012 07:33:46 +0000 (UTC) From: =?utf-8?Q?Jean-Baptiste_Onofr=C3=A9_=28Assigned=29_=28JIRA=29?= To: issues@karaf.apache.org Message-ID: <1127142152.19172.1330155226858.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1184157697.14939.1330086948814.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Assigned] (KARAF-1226) Karaf Client cannot run a script MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/KARAF-1226?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Jean-Baptiste Onofr=C3=A9 reassigned KARAF-1226: ------------------------------------------- Assignee: Jean-Baptiste Onofr=C3=A9 =20 > Karaf Client cannot run a script > -------------------------------- > > Key: KARAF-1226 > URL: https://issues.apache.org/jira/browse/KARAF-1226 > Project: Karaf > Issue Type: Bug > Components: karaf-shell > Affects Versions: 2.2.5 > Environment: Ubuntu 11.10 64-bit, OpenJDK 6 > Reporter: Hendy Irawan > Assignee: Jean-Baptiste Onofr=C3=A9 > Attachments: KARAF-1226-client.patch, KARAF-1226-shell.patch > > > Example usage: > {code} > echo osgi:ls | bin/client > {code} > or: > {code} > bin/client < commands.karafsh > {code} > or redirecting stdout to file: > {code} > echo osgi:ls | bin/client > bundles.txt > {code} > Expected outcome: > 1. Output of the command printed to stdout > 2. Banners etc. (if any) printed to stderr > 3. Shell prompt should not be output at all > 4. The client exits immediately > Actual behavior: > 1. All output including banners and the shell prompt are printed to stdou= t (only) > 2. The client then hangs but still using around 20% CPU usage. It's not p= ossible to Ctrl+C, and need to kill the process. > GNU tools (like bash) tend to detect the presence of an input stream, to = differ between interactive mode and a batch mode. > If this is not possible, can also add a switch e.g. "--batch" or "-b" for= "Batch mode". > Note that the karaf "bin/shell" script already handles this quite nicely.= .. by not hanging after executing commands, and exits properly. > BTW this should also be possible to do on karaf launcher itself (i.e. sta= rt Karaf, execute command(s), then immediately shutdown the runtime). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira