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

execute_child shouldn't use any signal-unsafe functions #53

Open
yasushi-saito opened this issue Jan 28, 2020 · 0 comments
Open

execute_child shouldn't use any signal-unsafe functions #53

yasushi-saito opened this issue Jan 28, 2020 · 0 comments

Comments

@yasushi-saito
Copy link

I see the uses of std::string and setenv after fork. I believe these functions are unsafe, because after fork, the state of memory heap is undefined. I haven't been able to produce crash myself so this issue isn't super critical, but it'd be good to fix them.

For setenv, perhaps we should create a new environ before fork in the parent. For std::string, we can just write a raw string using write(2) and call _exit.

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

No branches or pull requests

1 participant