www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000025

When Created: 09/24/1995 05:10:01
Against DJGPP version: 2.00.beta3
By whom: eliz@is.elta.co.il
Abstract: exec* family of functions pass environ incorrectly
Library functions like execvp() don't function correctly.  The symptom
is usually that they don't find the executable (although it's on the PATH),
or fail with mysterious message like ``: cannot open''.  If you call
spawnvp(P_OVERLAY, ...) instead, everything works.

Solution added: 09/24/1995 05:13:49
By whom: eliz@is.elta.co.il
The problem is that those functions declare environ thusly:

	extern *const environ[];

while the original declaration (on crt1.c) is:

	extern ** environ;

This mismatch causes exec* functions to emit incorrect code when they and
their callees access environ.  To correct the problem, I changed the
declaration to this:

	extern *const *environ;

which fixed the bug.

Fixed in version 2.00.beta4 on 10/08/1995 20:25:28
By whom: dj@delorie.com



  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010