sandbox: add comment.

This commit is contained in:
Mike McQuaid 2021-08-24 14:46:00 +01:00 committed by GitHub
parent 0f900edfa2
commit aa04277dc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,6 +102,7 @@ class Sandbox
begin begin
command = [SANDBOX_EXEC, "-f", seatbelt.path, *args] command = [SANDBOX_EXEC, "-f", seatbelt.path, *args]
# Start sandbox in a pseudoterminal to prevent access of the parent terminal.
T.unsafe(PTY).spawn(*command) do |r, w, pid| T.unsafe(PTY).spawn(*command) do |r, w, pid|
w.winsize = $stdout.winsize w.winsize = $stdout.winsize
trap(:WINCH) { w.winsize = $stdout.winsize } trap(:WINCH) { w.winsize = $stdout.winsize }