[cmucl-imp] Re: unix-execve and unicode
Raymond Toy
toy.raymond at gmail.com
Mon Dec 7 02:44:00 CET 2009
Helmut Eller wrote:
> * Raymond Toy [2009-12-06 20:23+0100] writes:
>
>
>> Helmut Eller wrote:
>>
>>> The code for unix-execve was apparently not updated for unicode.
>>> Maybe something like this could be added:
>>>
>>>
>> Do you have an example where this doesn't work? In unix-execve, there
>> is a call to %name->file which is supposed to convert string according
>> to the encoding given by *filename-encoding*. This currently defaults
>> to nil, so effectively, iso8859-1 is used.
>>
>
> cmucl -noinit -eval '(print (multiple-value-list (unix:unix-execve "/bin/sh" ())))' -eval '(quit)'
>
> Prints (NIL 13) but should just invoke a shell. 13 is "permission
> denied" because the "/" followed by zero is passed in.
>
> I also found a simpler solution: changing (* char) to c-string
> seems to work.
>
Thanks for the example. And changing (* char) to c-string in
sub-unix-execve is the correct change,with the addition of replace
(vector-sap program) to just program. I'll check in the fix shortly.
Thanks,
Ray
More information about the cmucl-imp
mailing list