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

Close threads on exec() #34

Open
rennergade opened this issue Nov 16, 2024 · 2 comments
Open

Close threads on exec() #34

rennergade opened this issue Nov 16, 2024 · 2 comments
Assignees

Comments

@rennergade
Copy link

I'm realizing this is a bug that we never addressed in NaCl-Lind which is incorrect, we should do this correctly here. The spec for exec says that all threads should be terminated on exec: https://stackoverflow.com/questions/36588387/what-happens-to-threads-when-exec-is-called

This issue is closely related to the issues with exit() we've been talking about here: Lind-Project/RawPOSIX#50

@qianxichen233
Copy link

Yeah, this is also an existing bug on exit syscall in lind-wasm that threads aren not terminated when when the main process exit. I wonder what are reliable ways to forcely terminate a running thread? Like pthread_cancel?

@rennergade
Copy link
Author

We were handling this using pthread_cancel in lind-nacl, but it was always sort of a workaround since cancelling threads is pretty scary.

I talk a bit about a potential solution here: Lind-Project/RawPOSIX#50 (comment)

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

3 participants