X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.0 required=5.0 	tests=BAYES_00,RCVD_IN_SORBS_WEB,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: david@adboyd.com (J. David Boyd)
Subject: Re: Show window for BASH script run with /bin/run
Date: Fri, 02 Apr 2010 14:31:47 -0400
Lines: 16
Message-ID: <e8r7hop3dv0.fsf@FLM000025LVE9F.catmktg.com>
References: <28121386.post@talk.nabble.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (cygwin)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

JPMcGrath <JPMcGrath@JPMcGrath.net> writes:

> I am running a bash script under cygwin from within another (non-cygwin)
> program.  The script normally does not interact with the user, so I use
> /usr/bin/run when running the script to avoid having a bash window
> constantly popping up and going away.  However, if the script encounters an
> error, I need to show the user what went wrong.  What I am looking for is a
> way for the script to show the hidden window if it encounters an error. 
> Does anyone know how to do this?
>
> Thanks in advance.

Write the error output of the hidden script to a file that was removed
before the script ran.  If the file exists after the script exits, pop
it up and show the contents to the user.  If the file doesn't exist
after the script exits, everything is fine.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

