delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/04/04/02:58:33

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
Date: Mon, 4 Apr 2005 16:58:12 +1000 (EST)
From: Luke Kendall <luke DOT kendall AT cisra DOT canon DOT com DOT au>
Subject: Re: zsh startup oddity
To: cygwin AT cygwin DOT com
In-Reply-To: <424D26BA.1070500@endbracket.net>
MIME-Version: 1.0
Message-Id: <20050404065813.38B0084C39@pessard.research.canon.com.au>

On  1 Apr, Michael Wardle wrote:
>  By what mechanism are you ensuring zsh is invoked as a login shell  
>  rather than a non-login shell? 

I think we were starting it via the cygwin shortcut (cygwin.bat), which
as you have said, just runs bash --login.  IIRC, the way we were
starting zsh was via an exec inside the user's .profile.  The trouble
was, the .profile was not being run if Cygwin's mkdir created the
/home mount point directory instead of Windows.

>  Does $- include "i"? 
>  Does setopt show that interactive is on? 
>   
>  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.

>  You've probably already checked these things, but I'd be surprised if  
>  this behavior was due to file permissions. 

We weren't surprised - we were flabbergasted!  Anyway, we'll give your
excellent shell.c a try and see how that goes.

Peter Castro replied to:

> > But /etc/passwd would source $HOME/.zprofile if /home had been created
> > by Windows Explorer.
> 
> I am unable to reproduce this.  Are you using the zsh.bat file provided
> or a custom startup bat file or just running the shell by itself?  Please
> make sure you are using the '-l' option to force a login shell.  zsh has
> greatly changed in a years time.  Please consider upgrading to a later
> release.

No, we weren't using zsh.bat.  Where does that get installed?  I can't
find it, though I see I have zsh 4.2.4 installed from my very recent
complete re-install.

I like the sound of Michael's shell.c because you don't need a separate
..bat file to start up each different shell.

Thanks for the suggestions,

luke

luke


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