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

kill -l with bogus numeric signal n outputs n & 127 #1

Open
okdana opened this issue Jul 2, 2018 · 0 comments
Open

kill -l with bogus numeric signal n outputs n & 127 #1

okdana opened this issue Jul 2, 2018 · 0 comments
Labels
bug question unreported Not reported to the ML

Comments

@okdana
Copy link
Owner

okdana commented Jul 2, 2018

(unposted)

% kill -l 9000 8000 7000
40
64
88

That's related to this code in jobs.c:

} else {
    if (WIFSIGNALED(sig))
        sig = WTERMSIG(sig);
    else if (WIFSTOPPED(sig))
        sig = WSTOPSIG(sig);
    if (1 <= sig && sig <= SIGCOUNT)
        printf("%s\n", sigs[sig]);
    else
        printf("%d\n", sig);
}

I know 127 is kind of a special number but i don't understand why it's doing this and i feel like it's undesirable. bash behaves more like i would expect:

$ kill -l 9000
bash: kill: 9000: invalid signal specification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug question unreported Not reported to the ML
Projects
None yet
Development

No branches or pull requests

1 participant