system(3) breaks stdin from the terminal
Author: oskar-skogCreated May 29, 2023Updated Jul 17, 2026
Labelsbug
Any call to system(3) causes stdin to always return EOF, not just in the calling program, but any program reading from stdin in cooked/normal/nocbreak mode. The problem persists even after running reset(1).
This only happens if /bin/sh points to /bin/Shell. Using ln -sf /bin/bash mnt/bin/sh in sync-local.sh solves the problem.
This also somehow causes sys.stdin.readline to hang in Python after hitting enter.
Last tested 2026-07-17 amd64, aarch64 with GNU toolchain on Debian 13 host
Source: SerenityOS/serenity