nsjail: don't restore console if nsjail runs in background

This commit is contained in:
Robert Swiecki 2019-10-04 00:33:29 +02:00
parent b3d544d155
commit 2c648d5879
2 changed files with 4 additions and 2 deletions

2
kafel

@ -1 +1 @@
Subproject commit 722b93a630e53ca472a4c69f61cb3dfc44ea5041
Subproject commit 8e69b8efae415cde3debffbb1e379d9e7a16835a

View File

@ -226,7 +226,9 @@ int main(int argc, char* argv[]) {
sandbox::closePolicy(nsjconf.get());
/* Try to restore the underlying console's params in case some program has changed it */
nsjail::setTC(STDIN_FILENO, trm.get());
if (!nsjconf->daemonize) {
nsjail::setTC(STDIN_FILENO, trm.get());
}
LOG_D("Returning with %d", ret);
return ret;