The code for unix-execve was apparently not updated for unicode. Maybe something like this could be added: Helmut PS: Trac on cl.net seems to be down.
Helmut Eller wrote:
The code for unix-execve was apparently not updated for unicode. Maybe something like this could be added:
Oops. Thanks for the tip. I'll f ix this shortly.
PS: Trac on cl.net seems to be down.
Ok. I'll ping the cl.net admins about this. Ray
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. The expected way to set the encoding is to call set-system-external-format with the desired encoding for the default streams and for filename encoding. Ray
* 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.
The expected way to set the encoding is to call set-system-external-format with the desired encoding for the default streams and for filename encoding.
Have to try that. Helmut
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
participants (2)
-
Helmut Eller -
Raymond Toy