Bitcoin Core 32.99.0
P2P Digital Currency
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
util.cpp File Reference
#include <mp/config.h>
#include <mp/util.h>
#include <cerrno>
#include <cstdio>
#include <fcntl.h>
#include <kj/common.h>
#include <kj/debug.h>
#include <kj/string-tree.h>
#include <optional>
#include <pthread.h>
#include <csignal>
#include <sstream>
#include <string>
#include <sys/types.h>
#include <spawn.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <system_error>
#include <thread>
#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

void mp::SetOsThreadName (const char *name)
 Set the OS-level name of the current thread.
 
std::string mp::ThreadName (const char *exe_name)
 Format current thread name as "{exe_name}-{$pid}/{thread_name}-{$tid}".
 
std::string mp::LogEscape (const kj::StringTree &string, size_t max_size)
 Escape binary string for use in log so it doesn't trigger unicode decode errors in python unit tests.
 
std::tuple< ProcessId, SocketId > mp::SpawnProcess (SpawnConnectInfoToArgsFn &&connect_info_to_args)
 Spawn a new process that communicates with the current process over a socket pair.
 
SocketId mp::StartSpawned (const SpawnConnectInfo &connect_info)
 Initialize spawned child process using the SpawnConnectInfo string passed to it, returning a socket id for communicating with the parent process.
 
std::array< SocketId, 2 > mp::SocketPair ()
 Create a socket pair that can be used to communicate within a process or between parent and child processes.
 
ProcessId mp::StartProcess (const std::vector< std::string > &args)
 Start a process and return its process id.
 
int mp::WaitProcess (ProcessId pid)
 Wait for a process to exit and return its exit code.
 

Variables

char ** environ
 

Variable Documentation

◆ environ

char** environ

Definition at line 42 of file util.cpp.