X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
X-IronPortListener: Outbound_SMTP
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; 	charset="UTF-8"
Subject: RE: lpr works? FAQ in error?
Date: Thu, 24 Jul 2008 13:19:33 -0400
Message-ID: <31DDB7BE4BF41D4888D41709C476B6570929B20A@NIHCESMLBX5.nih.gov>
In-Reply-To: <f60fe000807231320i38753dc3vc78af6dc6c029cbb@mail.gmail.com>
References: <380-2200855974950906@cantv.net> 	 <loom.20080717T220746-843@post.gmane.org> <g5ov52$9pm$1@ger.gmane.org> 	 <9a498418e4cd1ia8ll54i7eqiehdjmq0m5@4ax.com> 	 <ml59841anhmn21j3b0e83mk0hpnonb0rm7@4ax.com> 	 <31DDB7BE4BF41D4888D41709C476B6570929B1FA@NIHCESMLBX5.nih.gov> 	 <103f84ldjk247ihimh4enrpp7tmoc0sgos@4ax.com> <f60fe000807231320i38753dc3vc78af6dc6c029cbb@mail.gmail.com>
From: "Buchbinder, Barry (NIH/NIAID) [E]" <BBuchbinder@niaid.nih.gov>
To: "Mark J. Reed" <markjreed@mail.com>, <cygwin@cygwin.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id m6PF6vXG011763

Mark J. Reed wrote on Wednesday, July 23, 2008 4:20 PM:
> On Wed, Jul 23, 2008 at 4:00 PM, Wilfried wrote:
>> But there is no need to put the sleep command in.
>> I had the impression that the script waited until the cygstart
>> command was finished.
> 
> Yes, but the cygstart command doesn't wait for the command it starts;
> it returns to the shell prompt immediately.  So the script might
> start Notepad and then delete the file before Notepad even has a
> chance to try to load it.   

Giving cygstart a ` --wait ' option might be useful for some situations.
(Just a thought -- NOT a request!)  But a simple

$ notepad /p "$(cygpath -w "$tmp_file")"

waits for notepad to exit before issuing a new prompt, so one does
not need to do

$ "$(cygpath -u "$COMSPEC")" /c start /wait notepad.exe /p "$(cygpath -w "$tmp_file")"

or even

$ cygstart --wait notepad /p "$(cygpath -w "$tmp_file")"

(theoretically possible in the future)

- Barry
  -  Disclaimer: Statements made herein are not made on behalf of NIAID.

