delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/11/12:55:34

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: Wed, 11 May 2005 12:53:54 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Fixing strace and cygcheck so that they work with mount -X
Message-ID: <20050511165354.GA15412@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <Pine DOT GSO DOT 4 DOT 61 DOT 0505081605450 DOT 21700 AT slinky DOT cs DOT nyu DOT edu> <20050508230637 DOT GD3896 AT trixie DOT casa DOT cgf DOT cx> <Pine DOT GSO DOT 4 DOT 61 DOT 0505081958360 DOT 21700 AT slinky DOT cs DOT nyu DOT edu> <20050509002126 DOT GH3896 AT trixie DOT casa DOT cgf DOT cx> <20050509022611 DOT GA7850 AT trixie DOT casa DOT cgf DOT cx> <427F9C41 DOT 1000605 AT acm DOT org> <427FB7B2 DOT 8040903 AT mscha DOT nl> <20050510151746 DOT GV15665 AT trixie DOT casa DOT cgf DOT cx> <42822503 DOT 2090903 AT mscha DOT org> <20050511154036 DOT GD10119 AT trixie DOT casa DOT cgf DOT cx>
Mime-Version: 1.0
In-Reply-To: <20050511154036.GD10119@trixie.casa.cgf.cx>
User-Agent: Mutt/1.5.8i

On Wed, May 11, 2005 at 11:40:36AM -0400, Christopher Faylor wrote:
>On Wed, May 11, 2005 at 05:30:11PM +0200, Michael Schaap wrote:
>>On 10-May-2005 17:17, Christopher Faylor wrote:
>>
>>>On Mon, May 09, 2005 at 09:19:14PM +0200, Michael Schaap wrote:
>>>  
>>>
>>>>On 9-May-2005 19:22, David Rothenberger wrote:
>>>>
>>>>    
>>>>
>>>>>Does cygstart also need to be fixed? I've found that it doesn't
>>>>>propagate the full Cygwin environment when /bin is mounted in cygexec
>>>>>mode.
>>>>>
>>>>>% cygstart -- /bin/rxvt -e bash -c "'env; read x'"
>>>>>
>>>>>prints out a small set of environment variables when /bin is mounted
>>>>>in cygexec. When /bin is mounted normally, it gets the full environment.
>>>>>      
>>>>>
>>>>Well, cygstart is a proper Cygwin executable. However, it does use a
>>>>Windows API call (ShellExecute, see "cygstart --reference") to execute
>>>>whatever needs to be started, so I can see how it might depend on a
>>>>properly synchronized Windows environment.
>>>>
>>>>If anyone can tell me how to do this, I'll be happy to make the change
>>>>to cygstart.
>>>>    
>>>>
>>>
>>>This shows what I did to cygcheck:
>>>
>>>http://sources.redhat.com/cgi-bin/cvsweb.cgi/winsup/utils/cygcheck.cc.diff?cvsroot=uberbaum&r1=1.65&r2=1.66
>>>
>>>It's possible that the environment code may just work.  Otherwise,
>>>you'll have to grab the environment from cygwin and build a new
>>>environment block, I assume.
>>>
>>>  
>>>
>>Well, I gave it a try, but no success.
>>Since cygstart is a proper Cygwin executable, and cygcheck a normal
>>Windows one, the code needs to be quite different.
>
>It sounds like you need to read MSDN on CreateProcess and see what it says
>about "lpEnvironment":
>
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp

Btw, from the description, it sounds like cygstart is broken right now
and could be fixed right now.  You don't need any of the functionality
from the snapshot.  You just need to construct a windows lpEnvironment
block from the UNIX-like global variable, provided by cygwin: "extern char **environ".

cgf

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