bugmake - Bugs: bug #12209, PATH vs Path

 
 

bug #12209: PATH vs Path

Submitted by:  Alessandro Vesely <ale2003>
Submitted on:  Fri 04 Mar 2005 11:31:35 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 4.0Operating System: MS Windows
Fixed Release: 3.81Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 30 Nov 2006 01:58:42 PM UTC, comment #2:

-- code snippet from function.c:1475++

/* make sure that CreateProcess() has Path it needs */
sync_Path_environment();

if (!process_begin(hProcess, command_argv, envp, command_argv[0], NULL)) {
/* register process for wait */

The sync_Path_environment() sets PATH variable to environment, but the process_begin() is called with previously stored envp, so the PATH is set wrong for the first process_begin() call.

I would suggest moving the call to sync_Path_environment() before storing the envp, see the patch attached.

Easy way to demonstrate the difference is following Makefile with native-win32 version:

export PATH=c:/tmp
$(warning $(shell path))
$(warning $(shell path))

(file #11414)

Juha Laukala <jhl>
Thu 07 Apr 2005 10:16:04 PM UTC, comment #1:

OK, I applied this patch.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Fri 04 Mar 2005 11:31:35 AM UTC, original submission:

The CVS version attempts to maintain two environment
variables, PATH for ported Unix utilities and Path
for native win32 functioning. It always pushes "Path"
on the environment. Win9x's command.com fails to
recognize it and thus the $(shell) function doesn't
work.

The patch I submit always pushes "PATH" on the environment.
Its contents are initialized from an existing PATH entry
in the environment, or the first misspelled entry if
the former doesn't exist, or an empty string if none of
the above exist.

Alessandro Vesely <ale2003>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #2661:  PATHvsPath-patch.txt added by ale2003 (2KiB - text/plain - Removal of the PATH vs Path feature)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jhl (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 30 Nov 2006 01:58:42 PM UTCjhlAttached File-=>Added make_w32_path_change_fix.txt, #11414
    Sat 01 Apr 2006 07:13:50 AM UTCpsmithFixed Release4.0=>3.81
    Thu 07 Apr 2005 10:16:04 PM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0
    Fri 04 Mar 2005 11:31:35 AM UTCale2003Attached File-=>Added PATHvsPath-patch.txt, #2270

    Back to the top


    Powered by Savane 3.1-cleanup1