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

2017-04-12 Thread cyg Simple
On 4/12/2017 12:41 PM, Christian Franke wrote: > 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

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

2017-04-12 Thread Christian Franke
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

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

2017-04-12 Thread cyg Simple
On 4/11/2017 3:02 PM, Christian Franke wrote: > cyg Simple wrote: >> >>-i, --ignore-environment start with an empty environment >> >> A relative use of the executable will not be found if the environment is >> empty. > > Not necessarily (see Linux, *BSD, ...). POSIX says this is >

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

2017-04-11 Thread Christian Franke
cyg Simple wrote: -i, --ignore-environment start with an empty environment A relative use of the executable will not be found if the environment is empty. Not necessarily (see Linux, *BSD, ...). POSIX says this is "implementation-defined" - under the assumption that 'env' uses execvp()

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

2017-04-11 Thread cyg Simple
On 4/11/2017 7:10 AM, Christian Franke wrote: > Thomas Wolff wrote: >> Am 10.04.2017 um 22:29 schrieb Christian Franke: >>> A few years after https://cygwin.com/ml/cygwin/2014-09/msg00204.html >>> I found another use case of an unset PATH variable: >>> >>> The configure script from mandoc

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

2017-04-11 Thread Christian Franke
Thomas Wolff wrote: Am 10.04.2017 um 22:29 schrieb Christian Franke: A few years after https://cygwin.com/ml/cygwin/2014-09/msg00204.html I found another use case of an unset PATH variable: The configure script from mandoc (http://mdocml.bsd.lv/) uses this interesting approach to query

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

2017-04-11 Thread Thomas Wolff
Am 10.04.2017 um 22:29 schrieb Christian Franke: A few years after https://cygwin.com/ml/cygwin/2014-09/msg00204.html I found another use case of an unset PATH variable: The configure script from mandoc (http://mdocml.bsd.lv/) uses this interesting approach to query default CC command from

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

2017-04-10 Thread Christian Franke
A few years after https://cygwin.com/ml/cygwin/2014-09/msg00204.html I found another use case of an unset PATH variable: The configure script from mandoc (http://mdocml.bsd.lv/) uses this interesting approach to query default CC command from make: CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" |