1 #ifndef LIBFILEZILLA_PROCESS_HEADER
2 #define LIBFILEZILLA_PROCESS_HEADER
13 #include "glue/windows.hpp"
17 class impersonation_token;
46 bool spawn(
native_string const& cmd, std::vector<native_string>
const& args = std::vector<native_string>(),
bool redirect_io =
true);
48 bool spawn(std::vector<native_string>
const& command_with_args,
bool redirect_io =
true);
50 #if FZ_WINDOWS || FZ_UNIX
62 bool spawn(
native_string const& cmd, std::vector<native_string>
const& args, std::vector<int>
const& extra_fds,
bool redirect_io =
true);
64 bool spawn(
impersonation_token const& it,
native_string const& cmd, std::vector<native_string>
const& args, std::vector<int>
const& extra_fds,
bool redirect_io =
true);
92 bool write(
char const* buffer,
unsigned int len);
94 inline bool write(std::string_view
const& s) {
95 return write(s.data(),
static_cast<unsigned int>(s.size()));
102 HANDLE handle()
const;
131 class FZ_PUBLIC_SYMBOL forkblock final
137 forkblock(forkblock
const&) =
delete;
138 forkblock& operator=(forkblock
const&) =
delete;
bool spawn_detached_process(std::vector< native_string > const &cmd_with_args)
Starts a detached process.
Impersonation tokens for a given user can be used to spawn processes running as that user...
Definition: impersonation.hpp:32
std::wstring native_string
A string in the system's native character type and encoding. Note: This typedef changes depending on...
Definition: string.hpp:33
The namespace used by libfilezilla.
Definition: apply.hpp:17
Sets some global macros and further includes string.hpp.
The buffer class is a simple buffer where data can be appended at the end and consumed at the front...
Definition: buffer.hpp:26
The process class manages an asynchronous process with redirected IO.
Definition: process.hpp:26