Date: Sun, 15 Feb 2004 09:30:13 -0800 (PST) From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/script script.c Message-ID: <200402151730.i1FHUDFd027289@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
cperciva 2004/02/15 09:30:13 PST FreeBSD src repository Modified files: usr.bin/script script.c Log: Attempt #2 to fix script(1) if the standard input is closed: If we read EOF from STDIN_FILENO, write zero bytes into the pseudo-terminal; this is interpreted as an EOF by the program being scripted. I've tested this with two non-interactive scripts: # echo 5 | script foo sh -c 'read x; sleep $x; echo bar' # echo bar | xargs script foo echo and one interactive program: # script foo more /etc/passwd and everything seems to work properly... PR: bin/56166, bin/57414, ports/57415, ports/60534 Approved by: rwatson (mentor) MFC after: 2 weeks Revision Changes Path 1.24 +3 -1 src/usr.bin/script/script.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402151730.i1FHUDFd027289>