redis-cli --rdb: fix broken fsync/ftruncate for stdout (#9135)
redis-cli --rdb: fix broken fsync/ftruncate for stdout (#9135)

A change in redis 6.2 caused redis-cli --rdb that's directed to stdout to fail because fsync fails.
This commit avoids doing ftruncate (fails with a warning) and fsync (fails with an error) when the
output file is `-`, and adds the missing documentation that `-` means stdout.

Co-authored-by: Oran Agra <4bc4982385244a2789f53ac695e2aa0ced00df6d@redislabs.com>
Co-authored-by: Wang Yuan <840229c9314609b7941ffd4d9725f1dde2d3e0e9@163.com>
(cherry picked from commit 74fe15b3602ed7c003b5c53e45e31f7aa6d4a86f)

ctripcorp/redis,ctripcorp/redis,ctripcorp/redis,ctripcorp/redis