diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2018-01-12 09:18:21 +0100 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2018-01-12 09:59:12 +0100 |
commit | 148700a8ea4b1a6d7ac82f1ad504c4e1eaa4e263 (patch) | |
tree | e4f9eb70825e744812167e2374fdc531ccced0d1 /test/core/security/create_jwt.cc | |
parent | 7f2eb4bd41d68da0d249299419ec7c1db35f8123 (diff) |
windows needs fflush after fprintf
Diffstat (limited to 'test/core/security/create_jwt.cc')
-rw-r--r-- | test/core/security/create_jwt.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/core/security/create_jwt.cc b/test/core/security/create_jwt.cc index 867a8ba575..56ae9c891c 100644 --- a/test/core/security/create_jwt.cc +++ b/test/core/security/create_jwt.cc @@ -39,6 +39,7 @@ void create_jwt(const char* json_key_file_path, const char* service_url, grpc_slice_unref(json_key_data); if (!grpc_auth_json_key_is_valid(&key)) { fprintf(stderr, "Could not parse json key.\n"); + fflush(stderr); exit(1); } jwt = grpc_jwt_encode_and_sign( @@ -47,6 +48,7 @@ void create_jwt(const char* json_key_file_path, const char* service_url, grpc_auth_json_key_destruct(&key); if (jwt == nullptr) { fprintf(stderr, "Could not create JWT.\n"); + fflush(stderr); exit(1); } fprintf(stdout, "%s\n", jwt); @@ -72,16 +74,19 @@ int main(int argc, char** argv) { if (json_key_file_path == nullptr) { fprintf(stderr, "Missing --json_key option.\n"); + fflush(stderr); exit(1); } if (scope != nullptr) { if (service_url != nullptr) { fprintf(stderr, "Options --scope and --service_url are mutually exclusive.\n"); + fflush(stderr); exit(1); } } else if (service_url == nullptr) { fprintf(stderr, "Need one of --service_url or --scope options.\n"); + fflush(stderr); exit(1); } |