delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <39EE1E42.6BA2F3C@veritas.com> |
Date: | Wed, 18 Oct 2000 15:03:46 -0700 |
From: | Bob McGowan <rmcgowan AT veritas DOT com> |
Organization: | VERITAS Software |
X-Mailer: | Mozilla 4.73 [en] (WinNT; U) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
To: | cygwin <cygwin AT sources DOT redhat DOT com> |
Subject: | Re: sh |
References: | <20001018205231 DOT 10237 DOT qmail AT web115 DOT yahoomail DOT com> <39EE128A DOT 515A147E AT redhat DOT com> |
Turns out the problem on my end is how I was trying to invoke the shell, using a full path in a shortcut. When I put it in a batch file and changed it to the format used in cygwin.bat, it works. So the process is to copy sh.exe to -sh.exe and then start it with a batch file as follows: @echo off rem use drive letter where Cygwin is installed. c: cd \cygwin\bin -sh If doing this, be sure /etc/profile (and any other profiles you set up) do not contain any bash'isms or that the bash stuff is isolated. I've found that a good way to test (for bash or ksh) is to do a test of the RANDOM variable. In standard (sh) shells it will be empty. Corinna Vinschen wrote: > > Earnie Boyd wrote: > > --- Corinna Vinschen <vinschen AT redhat DOT com> wrote: > > > I don't understand the problem here. ash only checks for the first > > > character of argv[0] being a '-' character to read the profiles. > > > I copied sh.exe to -sh.exe as well to run ash as login shell on a > > > NT 3.51 system on which bash crashed for some reason. > > > > > > > Ok. I was basing my opinions on what Bob stated he experienced and previous > > versions of other shells that check for sh in argv[0]. Are you saying that > > copying sh.exe to -sh.exe and then executing -sh works to trigger login > > conditions in ash? > > Yes. Login conditions for ash means reading /etc/profile and > ./.profile. Note that directory ".". ash doesn't change to $HOME > by itself so it has to be done by the parent process or in > /etc/profile. > > Corinna > > -- > Corinna Vinschen Please, send mails regarding Cygwin to > Cygwin Developer mailto:cygwin AT sources DOT redhat DOT com > Red Hat, Inc. > mailto:vinschen AT redhat DOT com > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- Bob McGowan Staff Software Quality Engineer VERITAS Software rmcgowan AT veritas DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |