X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=4.5 required=5.0 tests=AWL,BAYES_50,SARE_RECV_IP_080040,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org X-Trace: 262207923/mk-filter-3.mail.uk.tiscali.com/B2C/$b2c-THROTTLED-DYNAMIC/b2c-CUSTOMER-DYNAMIC-IP/80.41.121.89/None/johne53 AT tiscali DOT co DOT uk X-SBRS: None X-RemoteIP: 80.41.121.89 X-IP-MAIL-FROM: johne53 AT tiscali DOT co DOT uk X-SMTP-AUTH: X-MUA: Microsoft Outlook Express 6.00.2900.3138Produced By Microsoft MimeOLE V6.00.2900.3350 X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqEEAN+nuUpQKXlZ/2dsb2JhbACKa8s3hBsF Message-ID: <005f01ca3c4b$e5385b10$4001a8c0@mycomputer> From: "John Emmas" To: Subject: Is this a known problem with getenv() ? Date: Wed, 23 Sep 2009 12:46:39 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 I first started using cygwin almost exactly a year ago. Because of other pressures I put it on the back burner (about 6 months ago) at which point, it was current. However, I haven't upgraded for about 6 months. This morning I needed to compile an app that uses the C call, getenv("PATH"); Let's say for the sake of argument that this was my path (as displayed in a console window after typing "set") :- /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/a:/b:/c:/d:/e That's not my actual path - just an example. Cygwin's getenv() is returning something like this:- /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/a:/b:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/c:/d:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/e:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin: Basically, any path folder that ends in '/bin' is being inserted into the path multiple times and I just wondered if this was a known problem? FWIW if I use the glib equivalent (g_getenv) I get the same problem (which probably just indicates that g_getenv is a wrapper around getenv). Thanks for any advice, John -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple