Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3BCFF639.B4F5CF47@syntrex.com> Date: Fri, 19 Oct 2001 11:45:29 +0200 From: Pavel Tsekov Organization: Syntrex Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: simple execvp test References: <3BCECA31 DOT 4FE7AAD2 AT syntrex DOT com> <20011018171144 DOT B19399 AT redhat DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Christopher Faylor wrote: > > On Thu, Oct 18, 2001 at 02:25:21PM +0200, Pavel Tsekov wrote: > >This mail is inspired by an offlist discussion with James Lee about vi > >execution before "cvs commit" command. > > > >Given the following simple test he says nothing happens after he > >executes it, as happens with the "cvs commit" command which fails to > >execute vi with the following error code "cannot exec vi: No such file > >or directory". > > > >#include > > > >int main() { char *arg[] = { 0 }; > > > >execvp("vi", arg); > > > >return 0; } > > > >If he sets for example the EDITOR variable to /usr/bin/vi then cvs > >suceeds in executing vi. > > > >So is this a known problem with execvp assuming that it should search > >the path for the executable. > > I can't duplicate any problem with your test case. It works as expected > for me. Ditto, cvs. Yes that's why I'm curios - it doesnt happen on every setup. However here is something which is different from most standard cygwin installs: He installed it in the root of his C: drive C:\bin /usr/bin system textmode C:\lib /usr/lib system textmode C: / system textmode Found: C:\bin\bash.exe Found: \bin\bash.exe Warning: C:\bin\bash.exe hides \bin\bash.exe Found: C:\bin\cat.exe Found: \bin\cat.exe Warning: C:\bin\cat.exe hides \bin\cat.exe Found: C:\bin\cpp.exe Found: \bin\cpp.exe Warning: C:\bin\cpp.exe hides \bin\cpp.exe Found: C:\bin\find.exe Found: \bin\find.exe Warning: C:\bin\find.exe hides \bin\find.exe Found: C:\bin\gcc.exe Found: \bin\gcc.exe Warning: C:\bin\gcc.exe hides \bin\gcc.exe Found: C:\bin\gdb.exe Found: \bin\gdb.exe Warning: C:\bin\gdb.exe hides \bin\gdb.exe Found: C:\bin\ld.exe Found: \bin\ld.exe Warning: C:\bin\ld.exe hides \bin\ld.exe Found: C:\bin\ls.exe Found: \bin\ls.exe Warning: C:\bin\ls.exe hides \bin\ls.exe Found: C:\bin\make.exe Found: \bin\make.exe Warning: C:\bin\make.exe hides \bin\make.exe Found: C:\bin\sh.exe Found: \bin\sh.exe Warning: C:\bin\sh.exe hides \bin\sh.exe Here is his path which may give additional details too: ygnus Win95/NT Configuration Diagnostics Current System Time: Fri Oct 19 15:50:23 2001 WinNT Ver 5.0 build 2195 Service Pack 2 Path: c /jdk1.3.1/bin /usr/local/bin /usr/bin /bin /Oracle/Ora81/bin /Program Files/Oracle/jre/1.1.7/bin /usr/local/bin /usr/bin /usr/bin /dev/ant/bin /WINNT/system32 /WINNT /WINNT/System32/Wbem . c /dev/ant/bin c /usr/local/emacs/bin SysDir: C:\WINNT\System32 WinDir: C:\WINNT I'm looking at the spawn_guts code to see if there is something in this setup which may broke execvp. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/