This is the mail archive of the cygwin@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]

simple execvp test


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 <unistd.h>

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.

--
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/


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