/** * Copyright - See the COPYRIGHT that is included with this distribution. * pvAccessCPP is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. */ #include #include #include #include #include namespace pva = epics::pvAccess; int main(int argc, char *argv[]) { int ret = 0; try { std::vector name(256u); if(osiGetUserName(&name[0], name.size())!=osiGetUserNameSuccess) throw std::runtime_error("Unable to determine username"); name[name.size()-1] = '\0'; const char *user = argc<=1 ? &name[0] : argv[1]; std::cout<<"User: "<