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: problen with run command and the environment


Thanks for your reply. I'll attach next time.

I'll accept what you say, but even environment
variables that are in my windows environment are not
in the environment of programs run under "run". By
environment, I mean that if you type set in a cmd
window, you get the windows environment. Practically
none of those environment variables that appear when I
type "set" in the cmd window are in programs run under
the cygwin "run" command. Also, this behaviour was not
observed in cygwin before I updated it recently. I
looked at the source of "run" and see all it does is a
CreateProcess with NULL in the environment pointer
which I thought simply passes "run"'s environment to
the newly created process. I put a printf in run.c
just before the CreateProcess call and got the HOME
environment variable and printed it. The value that is
printed is correct. The HOME environment variable in
the new process is incorrect.

Any ideas?

Thanks,

-jeff hardy


--- Igor Peshansky <pechtcha@cs.nyu.edu> wrote:

> On Wed, 18 Jan 2006, Jeff Hardy wrote:
> 
> > I have updated my windowsxp with the latest cygwin
> and
> > this breaks several scripts I have that use the
> run
> > command to start xterms without consoles. I have
> tried
> > to track the problem down and at least one problem
> is
> > that if I type "run env > /tmp/xxx" and look at
> > /tmp/xxx, most of my environment variables are
> > missing. Also, my HOME environment variable is now
> "/"
> > instead of what my home directory is. I have
> another
> > computer that I have not updated yet and when I do
> the
> > same exercise as above, all the environment
> variables
> > come across the run command.
> >
> > Anybody have any suggestions?
> 
> "run" will invoke your application in the Windows
> environment, not the
> Cygwin one.  If you want to reproduce the
> environment you have in the bash
> window, use "run" to start a login bash shell, and
> have it exec the
> command you want to run (e.g., I use 'run
> c:\cygwin\bin\bash.exe --login
> -c "exec /bin/xterm"').
> 
> > Here is the output of cygcheck:
> > [snip]
> 
> In the future, please *attach* the output of
> cygcheck instead of including
> it inline, as indicated in
> <http://cygwin.com/problems.html>, since it
> really screws up the archive searches.
> HTH,
> 	Igor
> -- 
> 				http://cs.nyu.edu/~pechtcha/
>       |\      _,,,---,,_	    pechtcha@cs.nyu.edu |
> igor@watson.ibm.com
> ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D.
> (name changed!)
>      |,4-  ) )-,_. ,\ (  `'-'		old name: Igor
> Pechtchanski
>     '---''(_/--'  `-'\_) fL	a.k.a
> JaguaR-R-R-r-r-r-.-.-.  Meow!
> 
> "Las! je suis sot... -Mais non, tu ne l'es pas,
> puisque tu t'en rends compte."
> "But no -- you are no fool; you call yourself a
> fool, there's proof enough in
> that!" -- Rostand, "Cyrano de Bergerac"
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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