43 lines
1.1 KiB
Diff
43 lines
1.1 KiB
Diff
From 8b2ad8b12dbef786ae508d9b5f342a56b491cba6 Mon Sep 17 00:00:00 2001
|
|
From: anatasluo <luolongjuna@gmail.com>
|
|
Date: Mon, 26 Jul 2021 03:33:16 +0000
|
|
Subject: [PATCH] add use fork pid support for kernel 4.19
|
|
|
|
Signed-off-by: anatasluo <luolongjuna@gmail.com>
|
|
---
|
|
config/nvwa-restore.yaml | 3 ++-
|
|
src/server.go | 5 +++++
|
|
2 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/config/nvwa-restore.yaml b/config/nvwa-restore.yaml
|
|
index 46201f9..ab97121 100644
|
|
--- a/config/nvwa-restore.yaml
|
|
+++ b/config/nvwa-restore.yaml
|
|
@@ -2,4 +2,5 @@ pids:
|
|
services:
|
|
restore_net: false
|
|
enable_quick_kexec: false
|
|
-enable_pin_memory: false
|
|
\ No newline at end of file
|
|
+enable_pin_memory: false
|
|
+enable_use_fork_pid: false
|
|
diff --git a/src/server.go b/src/server.go
|
|
index 3de06a5..a5872da 100644
|
|
--- a/src/server.go
|
|
+++ b/src/server.go
|
|
@@ -219,6 +219,11 @@ func getCriuExtPara() []string {
|
|
criuExtPara = append(criuExtPara, "--pin-memory")
|
|
}
|
|
|
|
+ enableFP := nvwaRestoreConfig.GetBool("enable_use_fork_pid")
|
|
+ if enableFP {
|
|
+ criuExtPara = append(criuExtPara, "--use-fork-pid")
|
|
+ }
|
|
+
|
|
return criuExtPara
|
|
}
|
|
|
|
--
|
|
2.25.1
|
|
|