Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Search PATH for executable path when not on Windows #1

Merged
merged 1 commit into from Dec 28, 2012

Conversation

mkottman
Copy link
Member

When running on OS other than Windows, srlua attempts to open argv[0] as the executable. When called from PATH, this file is not accessible and srlua fails to execute the file. This patch implements the PATH search to find the executable path on which fopen succeeds.

drahosp added a commit that referenced this pull request Dec 28, 2012
Search PATH for executable path when not on Windows
@drahosp drahosp merged commit 71cd5c7 into LuaDist:master Dec 28, 2012
@stevedonovan
Copy link
Member

I remember making some modifications to srlua.c and glue.c for the luabuild project:

https://github.com/stevedonovan/luabuild/tree/master/srlua

Passed them to Luiz, but of course we both then forgot about it ;)

@mkottman
Copy link
Member Author

Nice to know that what I was doing was "right", in a sense that the code is nearly identical. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants