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

Restartable syscalls on BSDs #150

Open
nbuwe opened this issue Aug 19, 2023 · 1 comment
Open

Restartable syscalls on BSDs #150

nbuwe opened this issue Aug 19, 2023 · 1 comment

Comments

@nbuwe
Copy link
Contributor

nbuwe commented Aug 19, 2023

When I ported Self VM to NetBSD and FreeBSD one kludge I had to not use SA_RESTART like linux does. I didn't have time to figure out what was wrong, I might have messed up elsewhere in the Self code (cf. setAsyncIfFail and friends).

# elif TARGET_OS_VERSION == NETBSD_VERSION \
|| TARGET_OS_VERSION == FREEBSD_VERSION
// This needs to play along with setNotifyEvents and setAsync - and
// with SA_RESTART it doesn't (cf. unix.self). I'm not quite sure
// why yet. For now just commit what is known to work.
static int install_flags() { return SA_ONSTACK | SA_SIGINFO; }

This also most likely has implications for InterruptedContext::in_system_trap b/c the pc will not be pointing to the trap instruction, but past it.

This is a reminder that this issue needs further investigation.

@russellallen
Copy link
Owner

Note for myself: I've confirmed this happens.
I thought it was causing socket issues, but that was e67fe3f

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

2 participants