delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/10/30/13:52:05

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: 30 Oct 2001 13:50:24 -0500
Message-ID: <20011030185024.32684.qmail@lizard.curl.com>
From: Jonathan Kamens <jik AT curl DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: New 1.3.4-blocking problem: execvp causes $0 to contain
windows path instead of Unix path
Mime-Version: 1.0

--Multipart_Tue_Oct_30_13:50:24_2001
Content-Type: text/plain; charset=US-ASCII

Save the enclosed files in a directory.  Run "gcc -o execvp
execvp.exe" in that directory.  Then run "<dir>/test-rel.sh".  It
should print "../../src/configure", but instead it'll print a Windows
path, starting with a drive letter and containing backslashes and
everything.

If you change execvp.c so that it uses "execv" instead of "execvp" and
then recompile it, the output of the test script will be correct.

This broke between the 20011020 snapshot and the 20011024 snapshot.

I will investigate more this afternoon, but not for the next few hours
(I have a meeting which I need to prepare for and attend), if somebody
else doesn't beat me to it.

  jik

--Multipart_Tue_Oct_30_13:50:24_2001
Content-Type: text/plain; name="test-rel.sh"; charset=US-ASCII
Content-Transfer-Encoding: 7bit

#!/bin/sh -e

execvp=`dirname $0`/execvp

cd /tmp

mkdir -p src build/win32
cd src
rm -f configure
cat >configure <<\EOF
#! /bin/sh

echo $0
EOF
chmod +x configure
cd ../build/win32
$execvp ../../src/configure

--Multipart_Tue_Oct_30_13:50:24_2001
Content-Type: text/plain; name="execvp.c"; charset=US-ASCII
Content-Transfer-Encoding: 7bit

#include <unistd.h>

main(int argc, char *argv[])
{
  --argc;
  ++argv;

  execvp(*argv, argv);
}
--Multipart_Tue_Oct_30_13:50:24_2001--

- Raw text -


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