FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
child.hpp File Reference

Spawns a child process and connects its I/O to pipes. More...

#include <chrono>
#include <fcntl.h>
#include <string>
#include <sys/prctl.h>
#include <sys/wait.h>
#include <unistd.h>
#include "../std/expected.hpp"
#include "../lib/linux.hpp"
#include "../lib/env.hpp"
#include "../lib/subprocess.hpp"
#include "../db/portal/message.hpp"
#include "../db/portal/daemon.hpp"
#include "config.hpp"
Include dependency graph for child.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ns_portal::ns_child
 Child process spawning and I/O management for portal IPC.
 
namespace  ns_portal
 Portal IPC system for host-container communication.
 

Functions

Value< void > ns_portal::ns_child::write_fifo (int const value, fs::path const &path_fifo)
 Writes a value to a fifo given a file path.
 
Value< void > ns_portal::ns_child::spawn (std::vector< std::string > const &vec_argv, ns_db::ns_portal::ns_message::Message const &message)
 Forks a child process and waits for it to complete.
 
Value< void > ns_portal::ns_child::spawn (ns_daemon::ns_log::Logs logs, ns_message::Message const &message)
 Forks and executes a new child process.
 

Detailed Description

Spawns a child process and connects its I/O to pipes.

Author
Ruan Formigoni

Definition in file child.hpp.