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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=jVkN9wUMIO+Cp4dovM+Vtt5RMKpe2Cb1Yvprur3ssU1uctFFrFalg 4SaNRQO4rfQYLr6QZ57Rv0JG86J5QjUlPLZdxs33uj1bsWHdnHGxyEsqjgcOdabd DkagzCnyYtAFPMSgUX/4DjyEvL+TUWVnbQNdbae6iIDDJ5xxogFY+M= 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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=hcwLG4TgpwqJxmQ2dJOIngnlE70=; b=qu6UrO/8ZlthOMjkePmUTjkR4zsE Sm3S1mDwknBOCyQ7Ev3cNsvY/kjY+kyzIOIpHuZ2znIrQ08bIikVtZ9RW40yuH8c U1EnU4EoAgm1ALV9CsB19mIsLTRsCZmy7bpHY4qH8+dAfiqVcjElL2volpIaOT56 CChvxuvYUepnFdo= 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=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Date: Fri, 17 Oct 2014 11:10:25 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Cannot exec() program outside of /bin if PATH is unset Message-ID: <20141017091025.GA10087@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20141009162906 DOT GA25389 AT calimero DOT vinschen DOT de> <571726 DOT 85545 DOT bm AT smtp112 DOT sbc DOT mail DOT ne1 DOT yahoo DOT com> <20141010103446 DOT GJ2681 AT calimero DOT vinschen DOT de> <816144 DOT 8551 DOT bm AT smtp119 DOT sbc DOT mail DOT ne1 DOT yahoo DOT com> <20141010153925 DOT GL2681 AT calimero DOT vinschen DOT de> <20141014193045 DOT GF2681 AT calimero DOT vinschen DOT de> <54403DCD DOT 7090107 AT t-online DOT de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: <54403DCD.7090107@t-online.de> User-Agent: Mutt/1.5.23 (2014-03-12) --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Oct 16 23:51, Christian Franke wrote: > Corinna Vinschen wrote: > >... > >I implemented this in the latest snapshot. It calls SetDllDirectory > >on Cygwin's /bin, and dlopen addiotnally tries to load the DLL with > >LoadLibraryEx(LOAD_WITH_ALTERED_SEARCH_PATH) if all else failed. >=20 > For some reason, the SetDllDirectory() call has no effect for exec(): >=20 > Testcase: >=20 > $ unset PATH >=20 > $ uname -srvm > -bash: uname: No such file or directory >=20 > $ /bin/uname -srvm > CYGWIN_NT-6.1-WOW64 1.7.33s(0.277/5/3) 20141014 19:44:03 i686 >=20 > $ /usr/sbin/alternatives > /usr/sbin/alternatives: error while loading shared libraries: ?: cannot o= pen > shared object file: No such file or directory Weird. The same sequence of commands works fine for me on W8, W8.1 and W10 64 bit, under i686 as well as x86_64 Cygwin.=20=20 [...] but it doesn't on Vista and W7, wow. The question now is, is it because the path given to SetDllDirectory is not propagated to child processes on older systems, or is it because the directory is only used in calls to LoadLibrary{Ex} on older systems. Stay tuned, I have to investigate this. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --6c2NcOVqGQ03X4Wi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUQN0BAAoJEPU2Bp2uRE+gt6YQAKC0FQoTBxJP77COl42OJOlY 1tSt1v2F2vqjqxHRZ2W7gLp/CcXBzJdROVewYrsQCcHNgxK+jUjbjWMYKW0aQ7De 2PLmK034Pesel9hpcHKe71JS2L7UNassCHOEyfuKoNJ/ySY7FYTJUqjcjiq7m4AR g1hGuAcMN1I3UmrnWxdERSISPSMNoVE+UWs4vojR9F7zw291k7w4WXyqlAJ03Hhf g7yNXtEqBHuI4Zq/MM7il13EChfzb9KP6AM0TziRAmT9q3EtXa4C8vBi8SlsFLLp xk5GU4Ui38/BZntZRBZROxBjNc9KKn1X9ifQKVHM8tOu2wIddre6mo/KDEdMN8YG DZtF7RYTELocetSQmAW7ASMna9koOEuq2w3k3vUpvJqK5ZgSU/dVeorrAw6ifAu/ tccozW+bP40PeSo8u7PJ2sX7O9WqVbubfo/lVgsEt/Pd8OGohTXm55czQuIoxikJ ZTuomnxsJE9BgoneEAz4CNTuOk0qd0jPzOLiqJqF+jhMJO6pauM/iyrdFgQAEUot RoMB0kpuA/03a5vmi1/LL8ofhbfVyv8b1PnhtDmb/R8NcdKP+cv8YzxoEKiWgQvz IVYMmwxlqbzaxYcnlk+xyjIJSUiOg89JaXZlcGhCniseXNDME+VHcdWpQl4A8pLJ FAQk1Wf61xEmkWtNndAG =HAlq -----END PGP SIGNATURE----- --6c2NcOVqGQ03X4Wi--