Skip to content

Fix CreateProcessW failing when :directory is specified on Windows#33

Open
Catsquotl wants to merge 1 commit intolem-project:masterfrom
Catsquotl:master
Open

Fix CreateProcessW failing when :directory is specified on Windows#33
Catsquotl wants to merge 1 commit intolem-project:masterfrom
Catsquotl:master

Conversation

@Catsquotl
Copy link
Copy Markdown

The dir-wide foreign string in create-process was missing the
:encoding :utf-16le parameter, while cmd-wide had it correctly set.
Since CreateProcessW expects UTF-16LE strings, passing a directory
would always cause the process creation to fail.

This broke M-x slime in Lem on Windows, which passes the buffer's
directory when starting the Lisp subprocess.

Fix: add :encoding :utf-16le to the dir-wide foreign string allocation.

The fix works, for full disclosure, Claude ai did most of the bug hunting and suggested fixes, I just copied and pasted through the process for a few hours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant