X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=vIY57t8/IfERDYMN LZuqpfSxNa2TE+n2Nj4qa5mHgGopQnn3M2h5jiHOtEQZE6hnc6kncWjVR91z6Pig GBtALjg1I9AoyS5uPKZwmPWEGysc11R2XWtdv9Rj96LTj6gHtUPiSuWrA1FuakXA SbFZoVLzGc7p/BhMKbGf1/11e6U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=XUC9RTmiDoq66U2u5dO+Cv 8v27g=; b=Axg+8d4fx32xhL1AwairtaxM3tZ4by4s/YH8BrvXvL5BfGu+a7LhEI GOYwKdx3JRF65nQfdy5UT9dB6sAqbPToN1lKF7btogPmLj+imlkbxWVv4FWrFfgl DL0/hQK96Gn6oJMOlQy0+hK9vIhqZicKun9JTXZyBsnQiK4HzoprU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=good!, H*f:sk:1be7896, H*f:sk:a64e772, H*MI:sk:a64e772 X-HELO: mail-io0-f171.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=HKNUyXClMF5mgWu9UENjJtwZcjKx9bN3LBvEpsH4y+4=; b=OnG4i0dBiOAnT2sBkAarY+/UhYxsShFSvmuLj6h2s7thZ7j7HRikfM1xaBGpNTFmht fzFyLFPq+OHqSzU6eulM26+l+h59KiQv6mlLdf8r6YOrgHjvawMohdd7gWgOOppNEl32 UixiEGc9jTxeiVW4vDjDeDbIRGgps9yEXK7REJvgHliZeQQBpXiqy9R8Sh0nlM/bWNXh +5gdDo3mGk0SOE1j6NbATLblT9d1tE0FdchjzBnQJ5GFHkamuOmdtynmtG5qsNsIl8j9 cV5tlG5cmLCvV2srFUrb+9ahifzNREG3BPuEKHtQzQOMRMh7NgtAhP1Zpl5zKFLv3NaT pXeg== X-Gm-Message-State: AN3rC/6I2qjeugQykAsuWb4X1O2IS0xdP+o1bh8q+FNhjezCv24FTlL0 SJUKPu6Zes2KGpeF X-Received: by 10.36.3.8 with SMTP id e8mr20070093ite.100.1492018062416; Wed, 12 Apr 2017 10:27:42 -0700 (PDT) Subject: Re: Use a default path in exec*p*() if PATH is unset? To: cygwin AT cygwin DOT com References: <7b94712a-465d-421b-bc76-720e443708d3 AT t-online DOT de> <6991638b-2400-dacd-28ee-e2d2c9d91ed4 AT gmail DOT com> <36d1b8e6-4d03-eb00-37f0-e12c9f1c792b AT t-online DOT de> <1be7896a-700a-5384-2220-cc7bc25065e8 AT gmail DOT com> From: cyg Simple Message-ID: Date: Wed, 12 Apr 2017 13:27:49 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 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 > Good! --ignore-environment is just that regardless of where the environment is set. > To force execv()-like behavior with -i, simply use > > env -i PATH=. prog > But this is what should occur anyway. -- cyg Simple -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple