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

Hudson commented on HADOOP-10816:
---------------------------------

FAILURE: Integrated in Hadoop-trunk-Commit #5896 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/5896/])
HADOOP-10816. KeyShell returns -1 on error to the shell, should be 1. (Mike 
Yoder via wang) (wang: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1611229)
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java
* 
/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestKeyShell.java


> KeyShell returns -1 on error to the shell, should be 1
> ------------------------------------------------------
>
>                 Key: HADOOP-10816
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10816
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 3.0.0
>            Reporter: Mike Yoder
>            Assignee: Mike Yoder
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-10816.001.patch, HADOOP-10816.002.patch
>
>
> I've seen this in several places now - commands returning -1 on failure to 
> the shell. It's a bug. Someone confused their posix style returns (0 on 
> success, < 0 on failure) with program returns, which are an unsigned 
> character. Thus, a return of -1 actually becomes 255 to the shell.
> {noformat}
> $ hadoop key create happykey2 --provider kms://http@localhost:16000/kms 
> --attr "a=a" --attr "a=b"
> Each attribute must correspond to only one value:
> atttribute "a" was repeated
> ...
> $ echo $?
> 255
> {noformat}
> A return value of 1 instead of -1 does the right thing.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to