delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/04/04/03:49:43

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Subject: Re: zsh startup oddity
From: Michael Wardle <michael AT endbracket DOT net>
To: cygwin AT cygwin DOT com
In-Reply-To: <20050404073346.581FD84C39@pessard.research.canon.com.au>
References: <20050404073346 DOT 581FD84C39 AT pessard DOT research DOT canon DOT com DOT au>
Date: Mon, 04 Apr 2005 17:46:11 +1000
Message-Id: <1112600771.24256.5.camel@localhost.localdomain>
Mime-Version: 1.0
X-IsSubscribed: yes

On Mon, 2005-04-04 at 17:33 +1000, Luke Kendall wrote:
> On  4 Apr, luke wrote:
> >  >  With Cygwin 1.5.13, zsh 4.2.4-1 and the simple shell invocation utility   
> >  >  posted to this list on March 24 <4242381E DOT 2020008 AT endbracket DOT net> (which   
> >  >  sets argv[0] to "-zsh"), zsh recognizes that it is a login shell and   
> >  >  correctly sources .zprofile.  
> >   
> >  Ah!  Looks perfect!  Thanks, Michael, we'll give that a try. 
> 
> At first I tried compiling with (gcc) -mno-cygwin, thinking it would be
> run from inside a Windows DOS environment, so wouldn't have access to
> cygwin, but that didn't compile.  I tried then with -mno-win32 and that
> worked fine, though I don't understand how it found cygwin1.dll.

The code uses ISO C99 strrchr() and BSD/GNU setenv(), but you'll
probably want Cygwin for the all the Unix functions (getpwuid(),
execv(), fork(), etc.) anyway.

I just did "make shell". :-)

> Is the intent simply to copy shell.exe into /usr/bin?

Yes, I put it in /bin and changed c:/cygwin/cygwin.bat to use that
instead.  You can put it /usr/bin of even / if you prefer.

> BTW, should you include a copyright and license term comment in shell.c?
> It would make me feel much more comfortable.

It's a trivial program I wrote with reference to no other programs.  I
hereby release it into the public domain.  Use it as you like.

> I've tried it on my system, and it's working well.  I'll get my zsh
> colleague to try it out soon.

Excellent.  The more the merrier!

-- 
Michael Wardle <michael AT endbracket DOT net>


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