[ 
https://issues.apache.org/jira/browse/HADOOP-11989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14548491#comment-14548491
 ] 

Steve Loughran commented on HADOOP-11989:
-----------------------------------------

my main concern is whether the {{--}} prefix works across all versions of Unix

though a test on OS/X answers that
{code}
$ kill -0 -- 1971
kill: illegal process id: --
{code}

Now, assuming that all platforms which support {{setsid}} also support {{--}} 
in kill, the string could be built up with setsid awareness checked first
{code}
if (isSetsidAvailable) 
 // kill -X -- -pid
else
// kill -X pid

after all, the -- is only needed on some setsid-aware platforms




> Kill command for process group id throws ExitCodeException
> ----------------------------------------------------------
>
>                 Key: HADOOP-11989
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11989
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 2.6.0
>         Environment: debian 7
>            Reporter: Chackaravarthy
>            Assignee: Chackaravarthy
>         Attachments: HADOOP-11989.patch
>
>
> In the environment where setsid available, kill command is constructed with 
> single dash, which throws ExitCodeException (improper usage of command) 
> {noformat}
> kill -signal_num -<process_group_id>
> {noformat}
> Encountered this issue due to YARN-3561 
> Kill command need to be constructed with double dash (--) which means "end of 
> command options" i.e. it tells ssh command not to try to parse what comes 
> after command line options. It should be constructed as follows :
> {noformat}
> kill -signal_num -- -<process_group_id>
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to