delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/12/15:07:01

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
Date: Fri, 12 Mar 2004 15:05:40 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Subshell
Message-ID: <20040312200540.GA4385@redhat.com>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <Pine DOT CYG DOT 4 DOT 58 DOT 0403121346010 DOT 1332 AT lap>
Mime-Version: 1.0
In-Reply-To: <Pine.CYG.4.58.0403121346010.1332@lap>
User-Agent: Mutt/1.4.1i
Reply-To: cygwin AT cygwin DOT com
Note-from-DJ: This may be spam

On Fri, Mar 12, 2004 at 01:49:27PM -0600, Gregory Borota wrote:
>#/bin/bash
>echo Silly
>( sleep 50 &
> ( sleep 50 ) )
>wait
>
>each subshell is "sh.exe".

Why would bash arbitrarily choose "sh.exe" as the subshell?

>I want to be be "bash.exe".  How do I force that without having to
>write bash -c ....
>
>P.S. Looked at cygwin faq, archive, didn't find the answer although this
>I would think has been brought up before.

Hmm.

  c:\>cd cygwin\bin

  c:\cygwin\bin>ren sh.exe sh-saf.exe
  C:\cygwin\bin\sh.exe -> C:\cygwin\bin\sh-saf.exe
       1 file renamed

  c:\cygwin\bin>bash
  bash-2.05b$ (sleep 1&)	# works
  bash-2.05b$ cat /tmp/tst
  #!/bin/bash
  echo Silly
  (sleep 1 &
   (sleep 1))
  bash-2.05b$ /tmp/tst
  Silly
  bash-2.05b$ # works

If bash used /bin/sh then it would have complained when running the above.

I verified via strace that bash wasn't looking for sh.exe and settling
for bash.exe if it didn't exist, too.
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam AT sourceware DOT org
and be permanently blocked from mailing lists at sources.redhat.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