Bitcoin Core 29.99.0
P2P Digital Currency
Namespaces | Functions
util.cpp File Reference
#include <mp/config.h>
#include <mp/util.h>
#include <errno.h>
#include <kj/common.h>
#include <kj/string-tree.h>
#include <pthread.h>
#include <sstream>
#include <stdio.h>
#include <string>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <system_error>
#include <unistd.h>
#include <utility>
#include <vector>
Include dependency graph for util.cpp:

Go to the source code of this file.

Namespaces

namespace  mp
 Functions to serialize / deserialize common bitcoin types.
 

Functions

std::string mp::ThreadName (const char *exe_name)
 Format current thread name as "{exe_name}-{$pid}/{thread_name}-{$tid}". More...
 
std::string mp::LogEscape (const kj::StringTree &string)
 Escape binary string for use in log so it doesn't trigger unicode decode errors in python unit tests. More...
 
int mp::SpawnProcess (int &pid, FdToArgsFn &&fd_to_args)
 Spawn a new process that communicates with the current process over a socket pair. More...
 
void mp::ExecProcess (const std::vector< std::string > &args)
 Call execvp with vector args. More...
 
int mp::WaitProcess (int pid)
 Wait for a process to exit and return its exit code. More...