This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Subshell
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 12 Mar 2004 15:05:40 -0500
- Subject: Re: Subshell
- References: <Pine.CYG.4.58.0403121346010.1332@lap>
- Reply-to: cygwin at cygwin dot com
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@sourceware.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/