public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: tednolan@bellsouth.net
To: cygwin@cygwin.com
Subject: Re: Cannot exec() program outside of /bin if PATH is unset
Date: Fri, 10 Oct 2014 12:10:00 -0000	[thread overview]
Message-ID: <816144.8551.bm@smtp119.sbc.mail.ne1.yahoo.com> (raw)
In-Reply-To: <CAMCbSMrar1Zu4p6gN=gc8-XqE-8RUTmP3er0ujeN--CHKzCNAQ@mail.gmail.com>

In message <CAMCbSMrar1Zu4p6gN=gc8-XqE-8RUTmP3er0ujeN--CHKzCNAQ@mail.gmail.com>
you write:
>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

Hmm,

It's been a while, but I think it is something like the extension is
a DLL, but it depends on another DLL.  Consider for instance, mysqltcl.
If you want to deploy that, you need the mysqltcl.dll and the mysql dll,
so you either have to be in the same dir when you load the extension,
or put that dir in PATH.

Unfortunately, I can't run a test release on my work machine, or take
my work progs home.

--
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

  reply	other threads:[~2014-10-10 12:10 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12 18:02 Christian Franke
2014-09-12 19:39 ` Eric Blake
2014-09-12 21:14   ` Christian Franke
2014-09-12 21:56     ` Andrey Repin
2014-09-12 23:04       ` Christian Franke
2014-09-12 23:06         ` Eric Blake
2014-09-12 23:13           ` Eric Blake
2014-09-13 16:17             ` Christian Franke
2014-09-15  7:47               ` Peter Rosin
2014-09-15  9:28                 ` Peter Rosin
2014-09-15 17:16                 ` Christian Franke
2014-10-08 13:41                   ` Corinna Vinschen
2014-10-08 17:16                     ` Christian Franke
2014-10-09 10:03                       ` Corinna Vinschen
2014-10-09 14:25                         ` Eric Blake
2014-10-09 16:29                           ` Corinna Vinschen
2014-10-09 16:34                             ` tednolan
2014-10-10 10:34                               ` Corinna Vinschen
2014-10-10 11:24                                 ` Jan Nijtmans
2014-10-10 11:32                                   ` Arjen Markus
2014-10-10 12:10                                     ` tednolan [this message]
2014-10-10 12:13                                       ` Arjen Markus
2014-10-10 15:39                                         ` Corinna Vinschen
2014-10-14 19:30                                           ` Corinna Vinschen
2014-10-16 21:51                                             ` Christian Franke
2014-10-17  9:10                                               ` Corinna Vinschen
2014-10-17 14:51                                                 ` Corinna Vinschen
2014-10-17 17:56                                                   ` Christian Franke
2014-10-17 18:20                                                     ` Corinna Vinschen
2014-10-17 20:36                                                       ` Csaba Raduly
2014-09-12 22:50     ` Eric Blake
2014-09-13  5:24       ` David Boyce
2014-09-14  9:40   ` Csaba Raduly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=816144.8551.bm@smtp119.sbc.mail.ne1.yahoo.com \
    --to=tednolan@bellsouth.net \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).