delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/20/04:34:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-VirusChecked: Checked
X-Env-Sender: Bill DOT Hughes AT cox DOT co DOT uk
X-Msg-Ref: server-35.tower-19.messagelabs.com!1082450034!14272446
X-StarScan-Version: 5.2.10; banners=cox.co.uk,-,-
X-Originating-IP: [62.172.235.173]
Message-ID: <476AFB33B6D50B4286FB94A671FC779E0392D5@COXML1.cox.co.uk>
From: "Hughes, Bill" <Bill DOT Hughes AT cox DOT co DOT uk>
To: cygwin AT cygwin DOT com
Subject: RE: [OT?] make bash script wait for called program to finish?
Date: Tue, 20 Apr 2004 09:33:54 +0100
MIME-Version: 1.0
X-IsSubscribed: yes

> Sent: 19 April 2004 17:35 From: Buchbinder, Barry (NIH/NIAID)
 
> For me (XP Pro) from cmd.exe, both notepad and write detach but from
> command.com only write detaches, notepad does not.
> 
..snip..
>   Yep, it certainly seems that some windows gui apps have the 
> behaviour of
> detaching from the console, while others remain attached and 
> so don't return
> control to the shell until they're finished.  I noticed this 
> in particular
> when editing text files at an interactive bash prompt: if I 
> use notepad.exe,
> my shell is locked up until I exit, whereas if I use 
> write.exe (wordpad), it
> detaches and the shell prompt returns immediately.
> 
>   I also note as a data point that when run from a cmd.exe shell, both
> notepad and wordpad detach.  I can only guess that wordpad has some
> functionality that notepad doesn't to detach itself, and that 
> the cmd.exe
> shell also has functionality that detects gui-based programs 
> and detaches
> them on launch (regardless of whether they're capable of detaching
> themselves).

If you put 'start /separate notepad' into a .cmd then run this from bash it
will give a detached notepad. My wordpad doesn't detach from bash (shrugs)
but I would expect a cmd containing 'start /wait wordpad' run from bash not
to detach if it did - er, if you see what I mean.

Bill

--

This e-mail transmission is strictly confidential and intended solely
for the person or organisation to whom it is addressed. It may contain
privileged and confidential information and if you are not the intended
recipient, you must not copy, distribute or take any action in reliance
on it. If you have received this email in error, please reply to the
sender as soon as possible and delete the message. Please note that we
are able to, and reserve the right to, monitor e-mail communications
passing through our network.

The views expressed in this email are not that of the company unless
specified within the message.

The inclusion of this footnote indicates that the mail message and any
attachments have been checked for the presence of known viruses.

If you have any comments regarding our policy please direct them to
postmaster AT cox DOT co DOT uk
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019