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

Implement emulated support for getpid. #243

Merged
merged 1 commit into from
Apr 5, 2021
Merged

Conversation

sunfishcode
Copy link
Member

Add a simple getpid emulation function which just returns a fixed
value, for applications that just use it for logging.

Add a simple `getpid` emulation function which just returns a fixed
value, for applications that just use it for logging.
Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't if this fine grained approach to emulation is scale-able.

One alternative would be have a single -lwasi-compat and -DWASI_COMPAT ?

this change lgtm though

@sunfishcode
Copy link
Member Author

It kind of feels right to keep them separate right now, because they imply different kinds of emulation. getpid is just "here's a bogus value". mmap is "i'll actually read the file for you, but in a different way". And so on. But yeah, I could see a "enable all" mode becoming useful.

@sunfishcode sunfishcode merged commit 659ff41 into main Apr 5, 2021
@sunfishcode sunfishcode deleted the sunfishcode/getpid branch April 5, 2021 23:58
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

Successfully merging this pull request may close these issues.

2 participants