delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/19/12:36:13

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
Message-ID: <F76C9B2DA2FC4C4CA0A18E288BBCBCF7082177F2@nihexchange24.nih.gov>
From: "Buchbinder, Barry (NIH/NIAID)" <BBuchbinder AT niaid DOT nih DOT gov>
To: cygwin AT cygwin DOT com
Subject: RE: [OT?] make bash script wait for called program to finish?
Date: Mon, 19 Apr 2004 12:34:33 -0400
MIME-Version: 1.0
X-IsSubscribed: yes

For me (XP Pro) from cmd.exe, both notepad and write detach but from
command.com only write detaches, notepad does not.

MS must want us all to be like the scientist would wouldn't predict what
would happen unless s/he had done the experiment.

-----Original Message-----
From: Dave Korn
Sent: Monday, April 19, 2004 12:12 PM
To: cygwin AT cygwin DOT com
Subject: RE: [OT?] make bash script wait for called program to finish?

> -----Original Message-----
> From: cygwin-owner On Behalf Of Buchbinder, Barry (NIH/NIAID)

> I was actually surprised that bash stopped when I did the experiment.
> 
> It wouldn't surprise me if it would depend on which program 
> one was trying
> to wait for, in addition to which version of windows. 

  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).

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....

--
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