Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite initialization code #232

Open
fkaa opened this issue Jan 5, 2016 · 2 comments
Open

Rewrite initialization code #232

fkaa opened this issue Jan 5, 2016 · 2 comments

Comments

@fkaa
Copy link
Collaborator

fkaa commented Jan 5, 2016

Re-starting the application via execv destroys any connection that external programs have with the process (debuggers, steam overlay etc.).

AFAICT the current initialization process goes like this:

  • main
  • Lua (launcher)
  • Launcher calls execv with different args
  • main
  • Lua (game)

To get it to one continous process we would need a way to tear down the launcher code and start up game code. Should this be a hardcoded function? eg. ib_connect_server(ip, port)

@iamgreaser
Copy link
Owner

Main reason for execv is because from a security standpoint it's easier to just dump everything and start again from a clean slate.

I'll be blunt and say this issue isn't something I would be willing to attempt, but if you want to have a go at it, feel free.

If anything, it'll make the steam overlay behave for those who like the overlay.

@rakiru
Copy link
Collaborator

rakiru commented Jan 6, 2016

Ensuring all setup/teardown is done in one place, that shouldn't be an issue, since reinitialisation should follow the same code path as the original initialisation did, so anything we don't clean wouldn't have been setup in the first place (although any static variables could catch you out I guess). The main problem I see with this is that you'd be deep in the call stack when you want to reset, and you need to get back out of there.

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

No branches or pull requests

3 participants