| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Subject: | Antwort: Re: 1.3.4: error in inheriting new PATH environment form WIN32 |
| executable to cygwin executable | |
| To: | cygwin AT cygwin DOT com |
| Cc: | cygwin AT cygwin DOT com, cgf AT redhat DOT com |
| X-Mailer: | Lotus Notes Release 5.0.5 September 22, 2000 |
| Message-ID: | <OF91CCB6A4.D82ED870-ONC1256AFE.0025B9CD@lossburg.arburg.com> |
| From: | Heiko_Elger AT arburg DOT com |
| Date: | Thu, 8 Nov 2001 08:02:42 +0100 |
| X-MIMETrack: | Serialize by Router on HUB02/DE/SRV/ARBURG(Release 5.0.7 |March 21, 2001) at |
| 08.11.2001 08:01:56 | |
| MIME-Version: | 1.0 |
Hello Christopher,
thanks for your info.
I know the the definition of MAX_PATH but I think it must be an old one - cause
you can set a path longer than MAX_PATH.
> Cygwin expects path spec components will be no more than MAX_PATH in length.
> MAX_PATH == 260. This is a Microsoft constant.
But I think the problem is not so easy ....
cause sometimes it works and sometimes it works not.
There are different was to set the path
1) If the path is set in a shell cmd.exe via "set path=........" - all works
fine and in a cygwin program the path is really the same.
2) If set in an non cygwin programe via putenv() and called a cygwin program via
system() the path is reset to null (if its to long)
3) if bot programs are compile with Microsoft all works fine
4) if both programms are compiled with cygwin all works fine too
So if cygwin expects a path not longer than MAX_PATH I think that tahe path has
to be reset every time.
And the same a above, I think that the specifikation tah a PATH has to be not
longer tahn 260 is an old specifikation.
Mit freundlichen Gruessen
best regards
Heiko Elger
********************
ARBURG GmbH + Co
Heiko Elger
- Softwareentwicklung - / - Research and Development -
Arthur-Hehl-Strasse
D-72290 Lossburg
Tel.: +49 (0) 7446 33-3659
Fax.: +49 (0) 7446 33-3365
mailto:heiko_elger AT arburg DOT com
http://www.arburg.com
Christopher Faylor
<cgf AT redhat DOT com> An: cygwin AT cygwin DOT com
Gesendet von: Kopie:
cygwin-owner AT sources. Thema: Re: 1.3.4: error in inheriting new PATH environment form WIN32 executable to cygwin
redhat.com executable
07.11.2001 20:09
Bitte antworten an
cygwin
On Wed, Nov 07, 2001 at 02:33:08PM +0100, Heiko_Elger AT arburg DOT com wrote:
>Hello,
>
>I have the following problem:
>
>If a MS WIN 32 program changes his environment PATH variable to a very long
>value (over 270 characters) and than calling a CYGWIN program per system() call
>the path inside the CYGWIN program is reset to NULL! If it calls a MS WIN 32
>program all works fine.
>
>We have this problem with clearmake in exporting a very long path and the shell
>is the CYGWIN sh.exe.
>
>I tried to reproduce it within a very small test.
>I wrote two small programs (belwo you wil find the sourcecode):
> changeenv.c --> MS WIN 32 program which change his PATH environment and
calls
>per system() the program "printpath"
> printpath.c --> prints the PATH environment to stdout
Cygwin expects path spec components will be no more than MAX_PATH in length.
MAX_PATH == 260. This is a Microsoft constant.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |