Skip to content
Commit 2bfed7d2 authored by Jann Horn's avatar Jann Horn Committed by Kees Cook
Browse files

selftests/seccomp: Don't call read() on TTY from background pgrp



Since commit 92d25637 ("kselftest: signal all child processes"), tests
are executed in background process groups. This means that trying to read
from stdin now throws SIGTTIN when stdin is a TTY, which breaks some
seccomp selftests that try to use read(0, NULL, 0) as a dummy syscall.

The simplest way to fix that is probably to just use -1 instead of 0 as
the dummy read()'s FD.

Fixes: 92d25637 ("kselftest: signal all child processes")
Signed-off-by: default avatarJann Horn <jannh@google.com>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220319010011.1374622-1-jannh@google.com
parent ce522ba9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment