Skip to content

Commit

Permalink
split-browser: Increase pipe capacity
Browse files Browse the repository at this point in the history
To avoid a hang before DisposableVM launch if the user has configured
very many pref() lines, try to increase the capacity of the named pipe
from 64 KiB to 1 MiB (the default for the fs.pipe-max-size sysctl).
  • Loading branch information
rustybird committed Jan 16, 2023
1 parent 5a1822b commit 986fdf4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vm/qubes-split-browser/usr/bin/split-browser
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@ dispvm() (
mkfifo -- "$SB_CMD_INPUT".tmp
exec {cmd_fd}<>"$SB_CMD_INPUT".tmp

# 1031 is fcntl.F_SETPIPE_SZ in Python 3.10+
python3 -Sc 'import fcntl; fcntl.fcntl(0, 1031, 1024**2)' <&"$cmd_fd" ||
true

d=/etc/qubes-rpc
bash_line="PATH=/usr/local$d:$d:\$PATH exec split-browser-disp"
printf '%s\n' "$bash_line" "$@" >&"$cmd_fd" # 64 KB pipe capacity
printf '%s\n' "$bash_line" "$@" >&"$cmd_fd"
mv -T -- "$SB_CMD_INPUT"{.tmp,}

{
Expand Down

0 comments on commit 986fdf4

Please sign in to comment.