This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

New 1.3.4-blocking problem: execvp causes $0 to contain windows path instead of Unix path


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
#!/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
#include <unistd.h>

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

  execvp(*argv, argv);
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]