RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
Go to the documentation of this file.
24 #ifndef LAUNCHER_PLUGINS_POSIX_SYSTEM_HPP
25 #define LAUNCHER_PLUGINS_POSIX_SYSTEM_HPP
29 #include <Optional.hpp>
33 namespace launcher_plugins {
43 namespace launcher_plugins {
110 template <
typename T>
118 result = in_posixFunction();
120 if (result == ERR && errno == EINTR)
142 template <
typename T>
145 T* out_result =
nullptr)
150 T result = posixCall<T>(in_posixFunction);
154 *out_result = result;
158 return systemError(errno, in_errorLocation);
168 bool realUserIsRoot();
182 Error restorePrivileges();
Class which represents the location of an error.
Definition: Error.hpp:74
std::string Name
Definition: PosixSystem.hpp:58
Class which represents a system user.
Definition: User.hpp:55
T posixCall(const std::function< T()> &in_posixFunction)
Makes a posix call and handles EINTR retries.
Definition: PosixSystem.hpp:111
std::string Address
Definition: PosixSystem.hpp:61
launcher_plugins::Error getIpAddresses(std::vector< IpAddress > &out_addresses, bool in_includeIPv6=false)
Gets the IP addresses of the machine running this process.
Error ignoreSignal(int in_signal)
Ignores a particular signal for this process.
Class which represents a successful operation (i.e. no error).
Definition: Error.hpp:437
Class which represents an error.
Definition: Error.hpp:174
Represents an IP address.
Definition: PosixSystem.hpp:55
Container class which represents a value that may or may not be set.
Definition: Optional.hpp:38
Error enableCoreDumps()
Enables core dumps for this process.
std::string getEnvironmentVariable(const std::string &in_name)
Gets an environment variable from the system.