diff options
Diffstat (limited to 'jrt_test/src/tests/mandatory-methods')
-rw-r--r-- | jrt_test/src/tests/mandatory-methods/extract-reflection.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp b/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp index 96f90c59645..cdcf02da465 100644 --- a/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp +++ b/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp @@ -1,13 +1,13 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/app.h> +#include <vespa/vespalib/util/signalhandler.h> #include <vespa/fnet/frt/supervisor.h> #include <vespa/fnet/frt/target.h> #include <vespa/fnet/frt/rpcrequest.h> #include <vespa/vespalib/util/time.h> #include <thread> -class RPCInfo : public FastOS_Application +class RPCInfo { public: @@ -68,17 +68,17 @@ public: } - int Main() override + int main(int argc, char **argv) { - if (_argc < 2) { + if (argc < 2) { printf("usage : rpc_info <connectspec> [verbose]\n"); return 1; } - bool verbose = (_argc > 2 && strcmp(_argv[2], "verbose") == 0); + bool verbose = (argc > 2 && strcmp(argv[2], "verbose") == 0); fnet::frt::StandaloneFRT server; FRT_Supervisor & supervisor = server.supervisor(); - FRT_Target *target = supervisor.GetTarget(_argv[1]); + FRT_Target *target = supervisor.GetTarget(argv[1]); FRT_RPCRequest *m_list = nullptr; FRT_RPCRequest *info = nullptr; @@ -91,10 +91,10 @@ public: } std::this_thread::sleep_for(1s); target->SubRef(); - target = supervisor.GetTarget(_argv[1]); + target = supervisor.GetTarget(argv[1]); } if (info->IsError()) { - fprintf(stderr, "Error talking to %s\n", _argv[1]); + fprintf(stderr, "Error talking to %s\n", argv[1]); info->Print(); FreeReqs(m_list, info); return 1; @@ -139,9 +139,8 @@ public: }; -int -main(int argc, char **argv) -{ - RPCInfo myapp; - return myapp.Entry(argc, argv); +int main(int argc, char **argv) { + vespalib::SignalHandler::PIPE.ignore(); + RPCInfo myapp; + return myapp.main(argc, argv); } |