]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/execute.h
core: allow preserving contents of RuntimeDirectory= over process restart
[thirdparty/systemd.git] / src / core / execute.h
index 9f07aa4aef2528f99b4d39ddfbfa200c24e929b9..93713e48ccf0b609919eac2629b002f0c32cc0ae 100644 (file)
@@ -72,6 +72,14 @@ typedef enum ExecOutput {
         _EXEC_OUTPUT_INVALID = -1
 } ExecOutput;
 
+typedef enum ExecPreserveMode {
+        EXEC_PRESERVE_NO,
+        EXEC_PRESERVE_YES,
+        EXEC_PRESERVE_RESTART,
+        _EXEC_PRESERVE_MODE_MAX,
+        _EXEC_PRESERVE_MODE_INVALID = -1
+} ExecPreserveMode;
+
 struct ExecStatus {
         dual_timestamp start_timestamp;
         dual_timestamp exit_timestamp;
@@ -211,6 +219,7 @@ struct ExecContext {
 
         char **runtime_directory;
         mode_t runtime_directory_mode;
+        ExecPreserveMode runtime_directory_preserve_mode;
 
         bool memory_deny_write_execute;
         bool restrict_realtime;
@@ -330,3 +339,6 @@ ExecInput exec_input_from_string(const char *s) _pure_;
 
 const char* exec_utmp_mode_to_string(ExecUtmpMode i) _const_;
 ExecUtmpMode exec_utmp_mode_from_string(const char *s) _pure_;
+
+const char* exec_preserve_mode_to_string(ExecPreserveMode i) _const_;
+ExecPreserveMode exec_preserve_mode_from_string(const char *s) _pure_;