Seastar
High performance C++ framework for concurrent servers
Functions
Interprocess Communication

Detailed Description

Seastar provides a set of APIs for interprocess communicate

Functions

future< std::tuple< file_desc, file_desc > > seastar::experimental::make_pipe ()
 
future< processseastar::experimental::spawn_process (const std::filesystem::path &pathname, spawn_parameters params)
 
future< processseastar::experimental::spawn_process (const std::filesystem::path &pathname)
 

Function Documentation

◆ make_pipe()

future<std::tuple<file_desc, file_desc> > seastar::experimental::make_pipe ( )

Create a pipe using pipe2

Returns
a tuple of file_desc, the first one for reading from the pipe, the second for writing to it.

◆ spawn_process() [1/2]

future<process> seastar::experimental::spawn_process ( const std::filesystem::path &  pathname)

Spawn a subprocess

Parameters
pathnamethe path to the executable
Returns
a process representing the spawned subprocess
Note
the this overload does not specify a params parameters for spawning the subprocess. Instead, it uses the pathname for the argv[0] in the params.

◆ spawn_process() [2/2]

future<process> seastar::experimental::spawn_process ( const std::filesystem::path &  pathname,
spawn_parameters  params 
)

Spawn a subprocess

Parameters
pathnamethe path to the executable
paramsparameters for spawning the subprocess
Returns
a process representing the spawned subprocess
Note
the subprocess is spawned with posix_spawn() system call, so the pathname should be relative or absolute path of the executable.