make `read-line` interruptable on a primitive port

Closes PR 14800

Merge to v6.1.1