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

POSIX & 'kill' - warn about non-portable usage #1540

Open
1 task done
bittorf opened this issue Apr 7, 2019 · 0 comments
Open
1 task done

POSIX & 'kill' - warn about non-portable usage #1540

bittorf opened this issue Apr 7, 2019 · 0 comments

Comments

@bittorf
Copy link

bittorf commented Apr 7, 2019

For new checks and feature suggestions

Here's a snippet or screenshot that shows the problem:

#!/bin/sh
kill -SIGUSR1 1234
kill -1 1234

Here's what shellcheck currently says:

no problems

Here's what I wanted or expected to see:

  • do not prepend 'SIG' in symbols, so use USR1 instead of SIGUSR1
  • use 'kill -s HUP' instead of 'kill -HUP'
  • always use symbolic names (not kill -INTEGER PID)
    (the integers are platform-specific and can be seen with 'kill -l' or in signals.h)
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

1 participant