Skip to content

WASI signal numbers out of sync with wasi-libc signal numbers #272

Description

@vapier

if we compare wasi-libc/libc-top-half/musl/arch/wasm32/bits/signal.h with wasi/api.h, we see wasi-libc defines SIGSTKFLT as signal 16, but this signal does not exist in the WASI spec at all. this causes all remaining signals to be off-by-one.

for example, the first few around the desync:

signal wasi-libc wasi API
SIGPIPE 13 13
SIGALRM 14 14
SIGTERM 15 15
SIGSTKFLT 16 -
SIGCHLD 17 16
SIGCONT 18 17
SIGSTOP 19 18

this makes working with signals kind of a pita as we have to maintain 2 tables and their mappings between them. from a simplicity pov, wasi-libc should just use the same set of signals & signal numbers as wasi api and call it a day.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions