This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cannot exec() program outside of /bin if PATH is unset
- From: Arjen Markus <arjen dot markus895 at gmail dot com>
- To: Andrey Repin <cygwin at cygwin dot com>
- Date: Fri, 10 Oct 2014 13:32:04 +0200
- Subject: Re: Cannot exec() program outside of /bin if PATH is unset
- Authentication-results: sourceware.org; auth=none
- References: <54137C7F dot 1040507 at redhat dot com> <541415B1 dot 8090500 at t-online dot de> <541698CC dot 7090802 at lysator dot liu dot se> <5416F946 dot 7010905 at t-online dot de> <20141008134106 dot GF29235 at calimero dot vinschen dot de> <5435714D dot 6060206 at t-online dot de> <20141009100317 dot GI29235 at calimero dot vinschen dot de> <54369ADE dot 7060201 at redhat dot com> <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> <CAO1jNwt5UyB9CDKJdotXUND--mg1sY-5Fu+-ZHf2atM5_=HArA at mail dot gmail dot com>
This might the way the pkgIndex.tcl file for this particular extension
has been implemented, but like Jan says, that is not the Tcl way.
Here is a sample that illustrates the more acceptable procedure:
# Tcl package index file, version 1.0
if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded itcl 4.0b7 [list load [file join $dir "itcl40b7.dll"] itcl]
package ifneeded Itcl 4.0b7 [list load [file join $dir "itcl40b7.dll"] itcl]
The variable "dir" is set by the package management subsystem and the
effect is that the _full_ path is constructed before the DLL is
actually loaded.
Regards,
Arjen
2014-10-10 13:24 GMT+02:00 Jan Nijtmans <jan.nijtmans@gmail.com>:
> 2014-10-10 12:34 GMT+02:00 Corinna Vinschen <corinna-cygwin@cygwin.com>:
>> On Oct 9 11:46, tednolan@bellsouth.net wrote:
>>> I'm pretty sure I've got some programs loading Tcl extensions that
>>> cd into the directory with the extension dlls, load the extension and then
>>> change back to where ever they were.
>>
>> Hmm. If so, it's quite a weird way to handle this, rather than
>> loading the modules with full path.
>>
>> Is that a Tcl "feature", or is it how certain Tcl apps are implemented?
>> I can't really believe the former...
>
> This is certainly not a Tcl "feature"! The standard Tcl extension
> mechanism always uses the full path simply because Tcl
> cannot depend on platform-specific ways to search for
> such libraries elsewhere.
>
> I'm willing to test this;I don't believe such a change
> will break anything in my Tcl environment.
>
> Regards,
> Jan Nijtmans
>
> --
> 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
>
--
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