[
https://issues.apache.org/jira/browse/ZOOKEEPER-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14300914#comment-14300914
]
Rakesh R commented on ZOOKEEPER-2074:
-------------------------------------
Thanks [~surendrasingh] for the patch. Can you move the command result check
and {{System.exit(1);}} one level up to the ZooKeeperMain#main() method. I
could see {{ZooKeeperMain#run()}} has default access, if someone embedded this
in their code then may exit the JVM, right?
> Incorrect exit codes for "./zkCli.sh cmd arg"
> ---------------------------------------------
>
> Key: ZOOKEEPER-2074
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2074
> Project: ZooKeeper
> Issue Type: Bug
> Affects Versions: 3.5.0
> Reporter: surendra singh lilhore
> Priority: Minor
> Attachments: ZOOKEEPER-2074_1.patch
>
>
> Linux@hghoulaslx406:/> $ZOOKEEPER_HOME/bin/zkCli.sh create /test "test"
> Created /test1
> Linux@hghoulaslx406:/> echo $?
> 0
> Linux@hghoulaslx406:/> $ZOOKEEPER_HOME/bin/zkCli.sh create /test "test"
> Node already exists: /test1
> Linux@hghoulaslx406:/> echo $?
> 0
> Linux@hghoulaslx406:/> $ZOOKEEPER_HOME/bin/zkCli.sh delete /test
> Linux@hghoulaslx406:/> echo $?
> 0
> Linux@hghoulaslx406:/> $ZOOKEEPER_HOME/bin/zkCli.sh delete /test
> Node does not exist: /test1
> Linux@hghoulaslx406:/> echo $?
> 0
> Here for failed command it should return exit code 1
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)