1*096c39faSKyle Evans#!/usr/bin/env -S porch -f 2*096c39faSKyle Evans-- 3*096c39faSKyle Evans-- Copyright (c) 2024 Kyle Evans <kevans@FreeBSD.org> 4*096c39faSKyle Evans-- 5*096c39faSKyle Evans-- SPDX-License-Identifier: BSD-2-Clause 6*096c39faSKyle Evans-- 7*096c39faSKyle Evans 8*096c39faSKyle Evanstimeout(3) 9*096c39faSKyle Evans 10*096c39faSKyle Evanslocal TTYINQ_DATASIZE = 128 11*096c39faSKyle Evanslocal scream = string.rep("A", TTYINQ_DATASIZE - 1) 12*096c39faSKyle Evans 13*096c39faSKyle Evansspawn("cat") 14*096c39faSKyle Evans 15*096c39faSKyle Evans-- Fill up a whole block with screaming + VEOF 16*096c39faSKyle Evanswrite(scream .. "^D") 17*096c39faSKyle Evansmatch(scream .. "$") 18*096c39faSKyle Evans 19*096c39faSKyle Evansscream = scream .. "A" 20*096c39faSKyle Evans 21*096c39faSKyle Evans-- Now fill up the next block, but spill the VEOF over to a third block. 22*096c39faSKyle Evanswrite(scream .. "^D") 23*096c39faSKyle Evansmatch(scream .. "$") 24