This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: zsh startup oddity


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.2020008@endbracket.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@endbracket.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]