delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/12/05/11:06:27

From: fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson)
Subject: bug in execvp()
5 Dec 1996 11:06:27 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199612051819.FAA20384.cygnus.gnu-win32@murlibobo.cs.mu.OZ.AU>
Original-To: dje AT canuck DOT cygnus DOT com, gnu-win32 AT cygnus DOT com
X-Mailer: ELM [version 2.4 PL24]
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Hi,

Cygnus's newlib has a bug in execvp():
it handles relative path names incorrectly.
Specifically, it searches the PATH (only) even
for filenames that include `/', such as `./foo'.
If your PATH does not include ".", then gnu-win32's execvp()
will fail on such cases.

	main() {
		char *argv[] = { "./foo", 0 };
		execvp(argv[0], argv);
	}

This bug causes `make' in gnu-win32 to fail when executing
commands such as `./foo' if PATH does not include ".".

-- 
Fergus Henderson <fjh AT cs DOT mu DOT oz DOT au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3         |     -- the last words of T. S. Garp.
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019