Use exit code 1 if redis-cli fails to connect (#10438)
Use exit code 1 if redis-cli fails to connect. Before https://github.com/redis/redis/pull/10382/, on a connection failure, exit code would be 1. After this PR, whether connection is established or not, `noninteractive()` return value is used as the exit code. On a failure, this function returns `REDIS_ERR` which is `-1`. It becomes `255` as exit codes are between `0-255`. There is nothing wrong by returning 1 or 255 on failure as far as I know but it'll break things that expect to see 1 as exit code on a connection failure. This is also how we realized the issue. With this PR, changing behavior back to using 1 as exit code to preserve backward compatibility.
Please register or sign in to comment