mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
29da75477b
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. Submitted by: Ronald Klop <ronald-freebsd8@klop.yi.org> Discussed with: kib, Chris Torek <chris.torek@gmail.com> Approved by: kib MFC after: 1 week |
||
---|---|---|
.. | ||
Makefile | ||
script.1 | ||
script.c |