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

Allow setting environment variables while launching runtime #4

Open
salrashid123 opened this issue Jun 1, 2017 · 2 comments
Open

Comments

@salrashid123
Copy link
Contributor

Suggest using

use execve instead of execv so that users can set and launch a runtime which may require specific .so files or other env variables

For example:

	char *envp[] =
	{
			"LD_LIBRARY_PATH=/user_code/lib:$LD_LIBRARY_PATH",
			NULL
	};

	execve(bin, const_cast<char* const*>(&args[0]), envp);  
@iangudger
Copy link
Contributor

Do you need to completely override the environment, or would being able to append lines be sufficient? I would like to continue to pass through the environment if possible.

@salrashid123
Copy link
Contributor Author

I'd prefer to pass through the env variables (I'd seek to minimize the impact to the runtime and only alter the few bits absolutely necessary and needed). In the example above, it'd be extending the LD_LIBRARY_PATH so the .so files a user would upload would be found.

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

No branches or pull requests

2 participants