self icon indicating copy to clipboard operation
self copied to clipboard

Restartable syscalls on BSDs

Open nbuwe opened this issue 1 year ago • 1 comments

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).

https://github.com/russellallen/self/blob/fcbb0d40a0b6d3accb88559b3efccc162d14e74d/vm/src/unix/os/sig_unix.hh#L47-L52

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.

nbuwe avatar Aug 19 '23 00:08 nbuwe