[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile-2.0 on mingw: the sequel
From: |
Mark H Weaver |
Subject: |
Re: guile-2.0 on mingw: the sequel |
Date: |
Sun, 25 Aug 2013 15:50:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
>> From: Mark H Weaver <address@hidden>
>> Cc: Eli Zaretskii <address@hidden>, "address@hidden" <address@hidden>
>> 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
- Re: guile-2.0 on mingw: the sequel, (continued)
- Re: guile-2.0 on mingw: the sequel, Panicz Maciej Godek, 2013/08/24
- Re: guile-2.0 on mingw: the sequel, Eli Zaretskii, 2013/08/25
- Re: guile-2.0 on mingw: the sequel, Mark H Weaver, 2013/08/25
- Re: guile-2.0 on mingw: the sequel, Eli Zaretskii, 2013/08/25
- Re: guile-2.0 on mingw: the sequel, Mark H Weaver, 2013/08/25
- Re: guile-2.0 on mingw: the sequel, Ludovic Courtès, 2013/08/25
- Re: guile-2.0 on mingw: the sequel, Panicz Maciej Godek, 2013/08/27
- Re: guile-2.0 on mingw: the sequel, Eli Zaretskii, 2013/08/26
- Re: guile-2.0 on mingw: the sequel, Mark H Weaver, 2013/08/23
- Re: guile-2.0 on mingw: the sequel, Eli Zaretskii, 2013/08/23
- Re: guile-2.0 on mingw: the sequel,
Mark H Weaver <=
- Re: guile-2.0 on mingw: the sequel, Mark H Weaver, 2013/08/25
- Re: guile-2.0 on mingw: the sequel, Eli Zaretskii, 2013/08/25
- Re: guile-2.0 on mingw: the sequel, Eli Zaretskii, 2013/08/25
- Re: guile-2.0 on mingw: the sequel, Mark H Weaver, 2013/08/25
- Re: guile-2.0 on mingw: the sequel, dsmich, 2013/08/25
- Re: guile-2.0 on mingw: the sequel, Eli Zaretskii, 2013/08/25
- Re: guile-2.0 on mingw: the sequel, Mark H Weaver, 2013/08/26
- Re: guile-2.0 on mingw: the sequel, Mark H Weaver, 2013/08/26
- Re: guile-2.0 on mingw: the sequel, Eli Zaretskii, 2013/08/26
- Re: guile-2.0 on mingw: the sequel, Eli Zaretskii, 2013/08/25