From: Mark H Weaver <mhw@netris.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: guile-user@gnu.org
Subject: Re: guile-2.0 on mingw: the sequel
Date: Sun, 25 Aug 2013 15:50:34 -0400 [thread overview]
Message-ID: <874nada6t1.fsf@tines.lan> (raw)
In-Reply-To: <83d2p4ifow.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 23 Aug 2013 18:34:39 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Mark H Weaver <mhw@netris.org>
>> Cc: Eli Zaretskii <eliz@gnu.org>, "guile-user\@gnu.org" <guile-user@gnu.org>
>> Date: Fri, 23 Aug 2013 11:13:19 -0400
>>
>> Of course, ideally we would allow the entire Guile install to be freely
>> relocatable, as Windows users have come to expect. This would require
>> some help from a Windows developer.
>
> Why should this feature be limited to Windows builds of Guile? Why
> not make it work for Posix platforms as well? Some other projects
> already do, they use argv[0] and PATH search to find the place where
> the executable is installed, and record relative file names from
> there.
Well, that's not generally how things are done on POSIX systems, and
furthermore I don't see how this could be made to work reliably on
POSIX. The location of the Guile executable is sometimes not found in
either argv[0] or PATH. For example, if you run the following script:
--8<---------------cut here---------------start------------->8---
#!/usr/local/bin/guile -s
!#
(format #t "~s~%" (program-arguments))
--8<---------------cut here---------------end--------------->8---
argv[0] will point to the script, not the Guile executable. I suppose
we could detect if argv[0] points to a script and read the shebang (and
iterate, if the shebang points to another script), but even that doesn't
cover all cases. It's possible to pass any arbitrary value for argv[0]
using the 'exec' family of system calls.
Regards,
Mark
next prev parent reply other threads:[~2013-08-25 19:50 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-22 20:25 guile-2.0 on mingw: the sequel Panicz Maciej Godek
2013-08-23 6:38 ` Eli Zaretskii
2013-08-23 9:29 ` Panicz Maciej Godek
2013-08-23 10:16 ` Eli Zaretskii
2013-08-23 20:14 ` Panicz Maciej Godek
2013-08-24 6:31 ` Eli Zaretskii
2013-08-24 8:05 ` Panicz Maciej Godek
2013-08-25 15:26 ` Eli Zaretskii
2013-08-25 16:59 ` Mark H Weaver
2013-08-25 17:47 ` Eli Zaretskii
2013-08-25 19:03 ` Ludovic Courtès
2013-08-25 19:34 ` Mark H Weaver
2013-08-27 21:51 ` Panicz Maciej Godek
2013-08-26 13:28 ` Eli Zaretskii
2013-08-23 15:13 ` Mark H Weaver
2013-08-23 15:34 ` Eli Zaretskii
2013-08-25 18:59 ` Ludovic Courtès
2013-08-25 21:19 ` Mark H Weaver
2013-08-26 2:35 ` Eli Zaretskii
2013-08-25 19:50 ` Mark H Weaver [this message]
2013-08-25 19:56 ` Mark H Weaver
2013-08-25 20:33 ` Eli Zaretskii
2013-08-25 20:40 ` Eli Zaretskii
2013-08-25 21:42 ` Mark H Weaver
2013-08-25 23:24 ` dsmich
2013-08-26 2:44 ` Eli Zaretskii
2013-08-26 5:56 ` Mark H Weaver
2013-08-26 6:26 ` Mark H Weaver
2013-08-26 13:10 ` Eli Zaretskii
2013-08-26 2:40 ` Eli Zaretskii
2013-08-25 20:32 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874nada6t1.fsf@tines.lan \
--to=mhw@netris.org \
--cc=eliz@gnu.org \
--cc=guile-user@gnu.org \
/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).