X-Spam-Check-By: sourceware.org Message-ID: <20060119005520.19356.qmail@web35614.mail.mud.yahoo.com> Date: Wed, 18 Jan 2006 16:55:20 -0800 (PST) From: Jeff Hardy Subject: Re: problen with run command and the environment To: cygwin AT cygwin DOT com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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 > , since it > really screws up the archive searches. > HTH, > Igor > -- > http://cs.nyu.edu/~pechtcha/ > |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | > igor AT watson DOT ibm DOT 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/