From 0ebdcadf126903cd6c4451bbc391f310b5f4922f Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Mon, 22 Feb 2021 21:57:03 +1300 Subject: [PATCH] api: add unshare back --- api/src/executor/job.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/executor/job.js b/api/src/executor/job.js index ae5f55c..cb4701d 100644 --- a/api/src/executor/job.js +++ b/api/src/executor/job.js @@ -70,7 +70,7 @@ class Job { async safe_call(file, args){ return await new Promise((resolve, reject) => { - const proc_call = ['bash',file, ...args] + const proc_call = ['unshare','-n','-r','bash',file, ...args].slice(!config.enable_unshare*3) var stdout = ''; var stderr = ''; const proc = cp.spawn(proc_call[0], proc_call.splice(1) ,{