20 #include <sys/types.h> 
   21 #include <sys/utsname.h> 
   34       ::sprintf( fname, 
"/proc/%d/cmdline", ::getpid() );
 
   35       FILE* cmdLine = ::fopen( fname, 
"r" );
 
   43         long len = ::fread( cmd, 
sizeof( 
char ), 
sizeof( cmd ), cmdLine );
 
   46           for ( 
char* token = cmd; token - cmd < len; token += ::strlen( token ) + 1 ) { result.
push_back( token ); }
 
   59           abi::__cxa_demangle( class_name, 
nullptr, 
nullptr, &status ), 
std::free );
 
   60       if ( !realname ) 
return class_name;
 
   64           "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >( (?=>))?"};
 
   76       static const size_t           STRING_SIZE = 512;
 
   78       if ( ::gethostname( hname.
data(), STRING_SIZE ) ) { 
return ""; }
 
   96       if ( ::uname( &ut ) ) { 
return "UNKNOWN Linux"; }
 
  103       if ( ::uname( &ut ) ) { 
return "UNKNOWN version"; }
 
  110       if ( ::uname( &ut ) ) { 
return "UNKNOWN"; }
 
  116       const char* acct = ::getlogin();
 
  117       if ( !acct ) acct = ::getenv( 
"LOGNAME" );
 
  118       if ( !acct ) acct = ::getenv( 
"USER" );
 
  120       return ( acct ? acct : 
"UNKNOWN" );