Use a default path in exec*p*() if PATH is unset?

Christian Franke
Thu Apr 13 12:34:00 GMT 2017

cyg Simple wrote:
> ...
> But I don't believe that env --ignore-environment should be using execvp
> and should be using execv instead.  That is for the upstream coreutils
> team to decide though.

Possibly not, as it would also require to check whether PATH is set 
later in the command line.

Always using execv() if -i is specified would break:

   env -i PATH=/bin:/usr/bin prog

To force execv()-like behavior with -i, simply use

   env -i PATH=. prog


Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list