[PATCH 3/4] dlopen: on x/lib search x/bin if exe is in x/bin

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Sep 2 09:03:00 GMT 2016


On Sep  2 10:46, Michael Haubenwallner wrote:
> Hi Corinna,
> 
> On 09/01/2016 03:32 PM, Corinna Vinschen wrote:
> > You could just use the global variable program_invocation_name.  If in
> > doubt, use the Windows path global_progname and convert it to full POSIX
> > via cygwin_conv_path.
> 
> Patch updated, using global_progname now.

Looks good and you're right to do it this way since I just noticed
that program_invocation_name may return a relative pathname.

Btw., in other calls which require the full POSIX path we use
mount_table->conv_to_posix_path instead of cygwin_conv_path (see
e. g. fillout_pinfo()).  It's a bit faster.  Maybe something for a 
followup patch.

Note for some later improvement:  I really wonder why we don't store
the absolute POSIX path of the current executable globally yet...


Thanks,
Cornina

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20160902/af1305e7/attachment.sig>


More information about the Cygwin-patches mailing list