X-Recipient: archive-cygwin AT delorie DOT 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: References: <380-2200855974950906 AT cantv DOT net> <9a498418e4cd1ia8ll54i7eqiehdjmq0m5 AT 4ax DOT com> <31DDB7BE4BF41D4888D41709C476B6570929B1FA AT NIHCESMLBX5 DOT nih DOT gov> <103f84ldjk247ihimh4enrpp7tmoc0sgos AT 4ax DOT com> From: "Buchbinder, Barry (NIH/NIAID) [E]" To: "Mark J. Reed" , X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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.