<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/usr.bin/script, branch stable/7</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test/atom?h=stable%2F7</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test/atom?h=stable%2F7'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/'/>
<updated>2011-10-21T05:41:20Z</updated>
<entry>
<title>MFC r226403:</title>
<updated>2011-10-21T05:41:20Z</updated>
<author>
<name>Mikolaj Golub</name>
<email>trociny@FreeBSD.org</email>
</author>
<published>2011-10-21T05:41:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=32819fbf77918840833e15cce1e2d4ff533ef058'/>
<id>urn:sha1:32819fbf77918840833e15cce1e2d4ff533ef058</id>
<content type='text'>
In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime &gt; 0 it
keept sending VEOF.

Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:

  echo 1 |script /tmp/script.out cat

PR:		bin/161526
Reported by:	Adrian Wontroba &lt;aw1@stade.co.uk&gt;, Stefan Bethke &lt;stb@lassitu.de&gt;
Tested by:	Stefan Bethke &lt;stb@lassitu.de&gt;
</content>
</entry>
<entry>
<title>MFC r225857:</title>
<updated>2011-10-10T11:07:36Z</updated>
<author>
<name>Glen Barber</name>
<email>gjb@FreeBSD.org</email>
</author>
<published>2011-10-10T11:07:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=fc1aa921a7ddd58c88e729007ed850120c64c11b'/>
<id>urn:sha1:fc1aa921a7ddd58c88e729007ed850120c64c11b</id>
<content type='text'>
 - Fix a few grammar and mdoc nits in script.1

PR:		161088
</content>
</entry>
<entry>
<title>MFC r225809:</title>
<updated>2011-10-04T11:10:11Z</updated>
<author>
<name>Mikolaj Golub</name>
<email>trociny@FreeBSD.org</email>
</author>
<published>2011-10-04T11:10:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=2c003f3fd76e028e399bb5ca8d6d00161c94f253'/>
<id>urn:sha1:2c003f3fd76e028e399bb5ca8d6d00161c94f253</id>
<content type='text'>
When script(1) reads EOF from input it starts spinning on zero-byte
reads eating 100% CPU. Fix this by skipping select on STDIN after
reading EOF -- permanently if STDIN is not terminal and for one second
if it is.

Also after reading EOF from STDIN we have to pass it to the program
being scripted. The previous approach was to write zero bytes into the
pseudo-terminal. This does not work because zero-byte write does not
have any effect on read. Fix this by sending VEOF instead.

Reported by:	Ronald Klop &lt;ronald-freebsd8@klop.yi.org&gt;
Discussed with:	kib, Chris Torek &lt;chris.torek@gmail.com&gt;
</content>
</entry>
<entry>
<title>MFC r212770 &amp; r212832:</title>
<updated>2010-10-14T03:13:20Z</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2010-10-14T03:13:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=cfd21e91da67c307e92e153356630a045c6f96b7'/>
<id>urn:sha1:cfd21e91da67c307e92e153356630a045c6f96b7</id>
<content type='text'>
  + Add the SCRIPT environmental variable to the sub-shell.
  + Add the 'command' argument (if supplied on the command line)
    to the typescript file.
</content>
</entry>
<entry>
<title>Deal with double whitespace.</title>
<updated>2004-07-03T00:24:45Z</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2004-07-03T00:24:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=557b7fa1488f8937156051e061ac3512330bcb7e'/>
<id>urn:sha1:557b7fa1488f8937156051e061ac3512330bcb7e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Mechanically kill hard sentence breaks.</title>
<updated>2004-07-02T22:22:35Z</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2004-07-02T22:22:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=6a3e8b0adc8c622ae61275a94d5d869980a68069'/>
<id>urn:sha1:6a3e8b0adc8c622ae61275a94d5d869980a68069</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Bumped document date.</title>
<updated>2004-05-19T09:53:03Z</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2004-05-19T09:53:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=c548db03535bae503114e2f62f37aceb1127a918'/>
<id>urn:sha1:c548db03535bae503114e2f62f37aceb1127a918</id>
<content type='text'>
Fixed markup nit.
</content>
</entry>
<entry>
<title>Attempt #2 to fix script(1) if the standard input is closed: If we</title>
<updated>2004-02-15T17:30:13Z</updated>
<author>
<name>Colin Percival</name>
<email>cperciva@FreeBSD.org</email>
</author>
<published>2004-02-15T17:30:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=d6a68195afb81df3adb0eefffea083d219e8035e'/>
<id>urn:sha1:d6a68195afb81df3adb0eefffea083d219e8035e</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Back out part of 1.21, since it breaks `script interactive-program`.  This</title>
<updated>2004-01-27T17:50:47Z</updated>
<author>
<name>Colin Percival</name>
<email>cperciva@FreeBSD.org</email>
</author>
<published>2004-01-27T17:50:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=0a43b788bf7b57041363353142cc8d23b588cc5b'/>
<id>urn:sha1:0a43b788bf7b57041363353142cc8d23b588cc5b</id>
<content type='text'>
re-breaks non-interactive portupgrade (or at least old versions of
portupgrade); I'll see if I can put together a solution which avoids
breaking anything later.

Approved by:	rwatson (mentor)
Noticed by:	Stefan Farfeleder, Joshua Goodall
</content>
</entry>
<entry>
<title>Fix SYNOPSIS of manual page, clustering no-arg options correctly.</title>
<updated>2004-01-22T21:26:41Z</updated>
<author>
<name>Sheldon Hearn</name>
<email>sheldonh@FreeBSD.org</email>
</author>
<published>2004-01-22T21:26:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=4294ff16a71fdc03ab7b1dc1df70caa25488d853'/>
<id>urn:sha1:4294ff16a71fdc03ab7b1dc1df70caa25488d853</id>
<content type='text'>
Sync usage with manpage.
</content>
</entry>
</feed>
