process#
Include dependency graph for process.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"23" [label="atomic" tooltip="atomic"]
"13" [label="functional" tooltip="functional"]
"19" [label="limits" tooltip="limits"]
"17" [label="boost/log/sinks.hpp" tooltip="boost/log/sinks.hpp"]
"38" [label="openssl/rand.h" tooltip="openssl/rand.h"]
"12" [label="filesystem" tooltip="filesystem"]
"11" [label="platform/common.h" tooltip="platform/common.h"]
"1" [label="src/process.h" tooltip="src/process.h" fillcolor="#BFBFBF"]
"31" [label="variant" tooltip="variant"]
"40" [label="openssl/x509.h" tooltip="openssl/x509.h"]
"20" [label="boost/format.hpp" tooltip="boost/format.hpp"]
"39" [label="openssl/sha.h" tooltip="openssl/sha.h"]
"26" [label="utility.h" tooltip="utility.h"]
"15" [label="src/logging.h" tooltip="src/logging.h"]
"8" [label="string" tooltip="string"]
"25" [label="map" tooltip="map"]
"29" [label="string_view" tooltip="string_view"]
"24" [label="condition_variable" tooltip="condition_variable"]
"6" [label="bitset" tooltip="bitset"]
"33" [label="libavutil/pixfmt.h" tooltip="libavutil/pixfmt.h"]
"32" [label="src/video_colorspace.h" tooltip="src/video_colorspace.h"]
"2" [label="optional" tooltip="optional"]
"36" [label="crypto.h" tooltip="crypto.h"]
"9" [label="vector" tooltip="vector"]
"18" [label="src/stat_trackers.h" tooltip="src/stat_trackers.h"]
"22" [label="array" tooltip="array"]
"4" [label="boost/process.hpp" tooltip="boost/process.hpp"]
"37" [label="openssl/evp.h" tooltip="openssl/evp.h"]
"21" [label="src/thread_safe.h" tooltip="src/thread_safe.h"]
"3" [label="unordered_map" tooltip="unordered_map"]
"14" [label="mutex" tooltip="mutex"]
"7" [label="chrono" tooltip="chrono"]
"30" [label="type_traits" tooltip="type_traits"]
"34" [label="moonlight-common-c/src/Limelight.h" tooltip="moonlight-common-c/src/Limelight.h"]
"16" [label="boost/log/common.hpp" tooltip="boost/log/common.hpp"]
"27" [label="algorithm" tooltip="algorithm"]
"35" [label="rtsp.h" tooltip="rtsp.h"]
"5" [label="config.h" tooltip="config.h"]
"28" [label="memory" tooltip="memory"]
"10" [label="nvenc/nvenc_config.h" tooltip="nvenc/nvenc_config.h"]
"11" -> "6" [dir=forward tooltip="include"]
"11" -> "12" [dir=forward tooltip="include"]
"11" -> "13" [dir=forward tooltip="include"]
"11" -> "14" [dir=forward tooltip="include"]
"11" -> "8" [dir=forward tooltip="include"]
"11" -> "5" [dir=forward tooltip="include"]
"11" -> "15" [dir=forward tooltip="include"]
"11" -> "18" [dir=forward tooltip="include"]
"11" -> "21" [dir=forward tooltip="include"]
"11" -> "26" [dir=forward tooltip="include"]
"11" -> "32" [dir=forward tooltip="include"]
"11" -> "34" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
"1" -> "5" [dir=forward tooltip="include"]
"1" -> "11" [dir=forward tooltip="include"]
"1" -> "35" [dir=forward tooltip="include"]
"1" -> "26" [dir=forward tooltip="include"]
"26" -> "27" [dir=forward tooltip="include"]
"26" -> "24" [dir=forward tooltip="include"]
"26" -> "28" [dir=forward tooltip="include"]
"26" -> "14" [dir=forward tooltip="include"]
"26" -> "2" [dir=forward tooltip="include"]
"26" -> "8" [dir=forward tooltip="include"]
"26" -> "29" [dir=forward tooltip="include"]
"26" -> "30" [dir=forward tooltip="include"]
"26" -> "31" [dir=forward tooltip="include"]
"26" -> "9" [dir=forward tooltip="include"]
"15" -> "16" [dir=forward tooltip="include"]
"15" -> "17" [dir=forward tooltip="include"]
"32" -> "33" [dir=forward tooltip="include"]
"36" -> "22" [dir=forward tooltip="include"]
"36" -> "37" [dir=forward tooltip="include"]
"36" -> "38" [dir=forward tooltip="include"]
"36" -> "39" [dir=forward tooltip="include"]
"36" -> "40" [dir=forward tooltip="include"]
"36" -> "26" [dir=forward tooltip="include"]
"18" -> "7" [dir=forward tooltip="include"]
"18" -> "13" [dir=forward tooltip="include"]
"18" -> "19" [dir=forward tooltip="include"]
"18" -> "20" [dir=forward tooltip="include"]
"21" -> "22" [dir=forward tooltip="include"]
"21" -> "23" [dir=forward tooltip="include"]
"21" -> "24" [dir=forward tooltip="include"]
"21" -> "13" [dir=forward tooltip="include"]
"21" -> "25" [dir=forward tooltip="include"]
"21" -> "14" [dir=forward tooltip="include"]
"21" -> "9" [dir=forward tooltip="include"]
"21" -> "26" [dir=forward tooltip="include"]
"35" -> "23" [dir=forward tooltip="include"]
"35" -> "36" [dir=forward tooltip="include"]
"35" -> "21" [dir=forward tooltip="include"]
"5" -> "6" [dir=forward tooltip="include"]
"5" -> "7" [dir=forward tooltip="include"]
"5" -> "2" [dir=forward tooltip="include"]
"5" -> "8" [dir=forward tooltip="include"]
"5" -> "3" [dir=forward tooltip="include"]
"5" -> "9" [dir=forward tooltip="include"]
"5" -> "10" [dir=forward tooltip="include"]
}](../../_images/graphviz-0f51670233cc9c4993bb71d4c9e7b6d5841b2861.png)
This graph shows which files directly or indirectly include process.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="src/process.h" tooltip="src/process.h" fillcolor="#BFBFBF"]
"4" [label="src/main.cpp" tooltip="src/main.cpp"]
"5" [label="src/process.cpp" tooltip="src/process.cpp"]
"6" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"2" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"3" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "6" [dir=back tooltip="include"]
}](../../_images/graphviz-2b857e255318dc3ee06a9c52ddca54e4f0fcfc2f.png)
todo
Defines
-
__kernel_entry#
-
namespace proc#
-
-
struct ctx_t#
- #include <src/process.h>
pre_cmds — guaranteed to be executed unless any of the commands fail. detached — commands detached from Sunshine cmd — Runs indefinitely until: No session is running and a different set of commands it to be executed Command exits working_dir — the process working directory. This is required for some games to run properly. cmd_output — empty — The output of the commands are appended to the output of sunshine “null” — The output of the commands are discarded filename — The output of the commands are appended to filename
Public Members
-
bool auto_detach#
-
std::string cmd#
-
std::vector<std::string> detached#
Some applications, such as Steam, either exit quickly, or keep running indefinitely.
Apps that launch normal child processes and terminate will be handled by the process grouping logic (wait_all). However, apps that launch child processes indirectly or into another process group (such as UWP apps) can only be handled by the auto-detach heuristic which catches processes that exit 0 very quickly, but we won’t have proper process tracking for those.
For cases where users just want to kick off a background process and never manage the lifetime of that process, they can use detached commands for that.
-
bool elevated#
-
std::chrono::seconds exit_timeout#
-
std::string id#
-
std::string image_path#
-
std::string name#
-
std::string output#
-
bool wait_all#
-
std::string working_dir#
-
bool auto_detach#
-
struct ctx_t#