v0.19: Fix some bugs in std/os signals #1492
Labels
No labels
UX
active development
backlog
blocker
bootstrap
bounty
bug
dependencies
discussion
documentation
duplicate
enhancement
flaky test
help wanted
invalid
javascript
question
release
tendentious
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mighty-gerbils/gerbil!1492
Loading…
Reference in a new issue
No description provided.
Delete branch "jay/gerbil:v0.19-fix-signals"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes portability and correctness bugs introduced in
:std/ossignal handling by #1484:kqueueFFI declarations used invalid C type identifiers.killarguments could truncate and select unintended targets.Focused Linux tests pass. Paired benchmarks found no statistically significant registration or callback-latency regression. Restored
killchecks add approximately 13 ns in a zero-signal probe; synthetic burst throughput was approximately 1% lower.Native BSD/macOS
kqueuesmoke testing remains pending.jay is this still WIP?
@vyzo hey, yes, I had astra go to town on this and I have not had time yet to validate its work or do any performance benchmarking. This week and weekend is super busy for me. You are welcome to take this over if you would like, or scrap it, otherwise I will have some more time next week!
it's ok we can wait for you.
WIP: v0.19: Fix some bugs in std/os signalsto v0.19: Fix some bugs in std/os signalsgenerally looks good, but i left a couple of comments that need addressing.
i would strongly prefer to put the ffi test support stuffs in a separate signal-test-support module that gets compiled with the stdlib.
@ -55,2 +55,2 @@(def-C-type/pointer kevent "struct kevent" release: "ffi_free")(def-C-type/pointer timespec "struct timespec" release: "ffi_free")(C-declare "typedef struct kevent ffi_kevent;")(C-declare "typedef struct timespec ffi_timespec;")note that we already have timespec as def-C-struct, you might want to reuse that. it also avoids mallocs.
@ -0,0 +14,4 @@(lambda (output)(display #<<END-SCHEME(import :std/ffi)(C-declare #<<END-Cwhy not create a separate signal-test-support module that is compiled and contains the ffi code.
this is the pattern we use for tests that require native code.
@vyzo addressed your feedback
lgtm. @fare you want to do a clanker assisted pass?
The clanker (Sol High) is satisfied—except for the part where we assume that pid_t is int, and don't check. But I believe that is a Gambit FFI issue. Maybe we need to improve the Gambit FFI at some point?
Clanky also asks for test runs on BSD, but oh well.
8805340a50to9d0639d043