[ https://issues.apache.org/jira/browse/KAFKA-3384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15213700#comment-15213700 ]
ASF GitHub Bot commented on KAFKA-3384: --------------------------------------- GitHub user matthewlmcclure opened a pull request: https://github.com/apache/kafka/pull/1148 Conform to POSIX kill usage I believe this addresses KAFKA-3384. The POSIX kill manpage is at http://pubs.opengroup.org/onlinepubs/9699919799/utilities/kill.html You can merge this pull request into a Git repository by running: $ git pull https://github.com/matthewlmcclure/kafka KAFKA-3384 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1148.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1148 ---- commit 8662f0dde8d920cdf59d2e4a425a0b5eab976082 Author: Matt McClure <m...@aya.yale.edu> Date: 2016-03-28T01:03:43Z Conform to POSIX kill usage The POSIX kill manpage is at http://pubs.opengroup.org/onlinepubs/9699919799/utilities/kill.html commit 9251cd2057c5019fa9117502091a349d8c665877 Author: Matt McClure <m...@aya.yale.edu> Date: 2016-03-28T01:05:40Z Conform to POSIX kill usage The POSIX kill manpage is at http://pubs.opengroup.org/onlinepubs/9699919799/utilities/kill.html ---- > bin scripts may not be portable/POSIX compliant > ----------------------------------------------- > > Key: KAFKA-3384 > URL: https://issues.apache.org/jira/browse/KAFKA-3384 > Project: Kafka > Issue Type: Bug > Affects Versions: 0.9.0.1 > Reporter: Ewen Cheslack-Postava > Assignee: Ewen Cheslack-Postava > Fix For: 0.10.1.0 > > > We may be using some important tools in a non-POSIX compliant and > non-portable way. In particular, we've discovered that we can sometimes > trigger this error: > /usr/bin/kafka-server-stop: line 22: kill: SIGTERM: invalid signal > specification > which looks like it is caused by invoking a command like {{kill -SIGTERM > <pid>}}. (This is a lightly modified version of {{kafka-server-stop.sh}}, but > nothing of relevance has been affected.) > Googling seems to suggest that passing the signal in that way is not > compliant -- it's a shell extensions. We're using {{/bin/sh}}, but that may > be aliased to other more liberal shells on some platforms. To be honest, I'm > not sure exactly the requirements for triggering this since running the > command directly on the same host via an interactive shell still works, but > we are definitely limiting portability using the current approach. > There are a couple of possible solutions: > 1. Standardize on bash. This lets us make more permissive wrt shell features > that we use. We're already using /bin/bash in the majority of scripts anyway. > Might help us avoid a bunch of assumptions people make when bash is aliased > to sh: https://wiki.ubuntu.com/DashAsBinSh > 2. Try to clean up scripts as we discover incompatibilities. The immediate > fix for this issue seems to be to use {{kill -s TERM}} instead of {{kill > -SIGTERM}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)